13.07.2014, 06:19
Hello guys,
i have a Problem with my /god command ,i bet you know what does that command do so i wont be telling.
the problem is that when i use it the server stops and i need to go to the cpanel and start it.
here's the pawn code of /god
and then OnPlayerCommandText
i have a Problem with my /god command ,i bet you know what does that command do so i wont be telling.
the problem is that when i use it the server stops and i need to go to the cpanel and start it.
here's the pawn code of /god
pawn Код:
#define INFINITY (Float:0x7F800000)
new GodMode[MAX_PLAYERS];
and then OnPlayerCommandText
pawn Код:
CMD:god(playerid, params[])
{
if(GodMode[playerid] == 0)
{
SetPlayerHealth(playerid, INFINITY);
GodMode[playerid] = 1;
SendClientMessage(playerid, 0x10F441AA, "You have Enabled your God Mode.");
SendClientMessageToAll(-1, "%s has Disabled his/her GodMode.");
}
else if(GodMode[playerid] == 1)
{
SetPlayerHealth(playerid, 100.0);
GodMode[playerid] = 0;
SendClientMessage(playerid, 0x10F441AA, "You have Dissabled your God Mode.");
SendClientMessageToAll(-1, "%s has Disabled his/her GodMode.");
}
return 1;
}