I compiled this plugin and I got 6 errors , here they are :
Code:
error 029: invalid expression, assumed zero
error 017 : unidentified symbol "god_off"
error 017 : unidentified symbol "sID"
error 001 : expected token ";" but found "]"
error 029 : invalid expression, assumed zero
error 001 : expected token "}" but found "end of file"
Here is the plugin incase you want to check it :
Code:
#include <amxmodx>
#include <fun>
public plugin_init()
{
register_plugin("amx_god","0.1","Peli")
register_cvar("amx_god","1")
register_event("ResetHUD","god_on","b")
}
public god_on( id )
{
if (get_cvar_num("amx_god") == 1)
return PLUGIN_CONTINUE
new players[32], numberofplayers, i, cur_id
get_players(players,numberofplayers)
for (i=0;i<numberofplayers;i++)
{
cur_id = players[i]
set_user_godmode(cur_id,1)
}
set_hudmessage( 255, 0, 0, -1.0, -1.0, 0, 6.0, 10.0, 0.5, 1.5, 4 )
for (i=0;i<numberofplayers;i++)
{
cur_id = players[i]
show_hudmessage(cur_id, "SPAWN PROTECTION IS ENABLED")
set_user_godmode(cur_id,1)
new sID[2]
sID[0] = id
set_task(10.0,"god_off", 0, sID, 1)
return PLUGIN_CONTINUE
}
public god_off( sID[] )
{
new cur_id = sID[0]
set_user_godmode(cur_id,0)
return PLUGIN_CONTINUE
}
Okay thanks guys , try to help me.