11.10.2012, 12:11
You have to include zcmd.inc which you can download from:
https://sampforum.blast.hk/showthread.php?tid=91354
And yea replace it with this:
You forgot some { and } very important to look at those things when you are scripting.
[QUOTE=gtakillerIV;2164430]Before:
QUOTE]
https://sampforum.blast.hk/showthread.php?tid=91354
And yea replace it with this:
You forgot some { and } very important to look at those things when you are scripting.
[QUOTE=gtakillerIV;2164430]Before:
PHP код:
CMD:god(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"Mag jij niet!.");
if(GodMode[playerid] == 0) //god mode not set, lets set it
{
SetPlayerHealth(playerid, INFINITY); //set the health to infinity
GodMode[playerid] = 1; //set godmode to true
SendClientMessage(playerid, 0xFF0000FF, "Godmode aan");
}
else if(GodMode[playerid] == 1) //god mode set .. lets unset it
{
SetPlayerHealth(playerid, 100.0); //set health to 100%
GodMode[playerid] = 0; //set godmode to false
SendClientMessage(playerid, 0xFF0000FF, "Godmode uit");
}
return 1;
}