Cerere Bonus
Posted: 20 Dec 2013, 22:46
Totul despre Counter-Strike, Resurse si Servere
https://www.extreamcs.com/forum/
Code: Select all
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#define PLUGIN "Deathrun: Spawn Bonus"
#define VERSION "1.0"
#define AUTHOR "Adventx"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "hamPlayerSpawnPost", 1 )
}
public hamPlayerSpawnPost(id)
{
if( is_user_alive( id ) )
{
if(cs_get_user_team(id) == CS_TEAM_CT )
{
set_user_health(id, get_user_health(id) +50) //Health Bonus
set_user_armor(id, get_user_armor(id) +50) //Armor Bonus
set_user_maxspeed(id, 251.0) // Set MaxSpeed
ChatColor(id, "!g[Bonus] !nYou were given !t50 Extra Health, 50 Armor, and 251 Speed!")
}
}
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!n", "^1") // Default Color
replace_all(msg, 190, "!t", "^3") // Team Color
replace_all(msg, 190, "!t2", "^0") // Team2 Color
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
#define AUTHOR "Adventx" :-qadventx wrote:L-am facut si eu :DCode: Select all
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <cstrike> #include <fun> #include <hamsandwich> #define PLUGIN "Deathrun: Spawn Bonus" #define VERSION "1.0" #define AUTHOR "Adventx" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam(Ham_Spawn, "player", "hamPlayerSpawnPost", 1 ) } public hamPlayerSpawnPost(id) { if( is_user_alive( id ) ) { if(cs_get_user_team(id) == CS_TEAM_CT ) { set_user_health(id, get_user_health(id) +50) //Health Bonus set_user_armor(id, get_user_armor(id) +50) //Armor Bonus set_user_maxspeed(id, 251.0) // Set MaxSpeed ChatColor(id, "!g[Bonus] !nYou were given !t50 Extra Health, 50 Armor, and 251 Speed!") } } } stock ChatColor(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") // Green Color replace_all(msg, 190, "!n", "^1") // Default Color replace_all(msg, 190, "!t", "^3") // Team Color replace_all(msg, 190, "!t2", "^0") // Team2 Color if (id) players[0] = id; else get_players(players, count, "ch") { for (new i = 0; i < count; i++) { if (is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]) write_byte(players[i]); write_string(msg); message_end(); } } } }
Ceea ce ti-am explicat eu pe mess ziceai ca nu merge. Ai luat din pluginul de sus.adventx wrote:PS: :)) inca eu primul te-am intrebat pe mess despre speed, pluginul e scris de mine de la 0