24.02.2013, 21:35
Tente
pawn Код:
//#define FILTERSCRIPT
#include <a_samp>
new bool:GodMode[MAX_PLAYERS];
new Float:hpantes;
forward GodModeFunc();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Imortalidade para Hidan");
print("--------------------------------------\n");
SetTimer("GodModeFunc",1000,1);
return 1;
}
public OnPlayerConnect(playerid)
{
GodMode[playerid] = false;
}
public OnFilterScriptExit()
{
print("\n--------------------------------------");
print(" Fim do sistema Imortal");
print("--------------------------------------\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hidanimortalmode", cmdtext, true, 10) == 0)
{
if(GodMode[playerid] == false)
{
GetPlayerHealth(playerid,hpantes);
SetPlayerHealth(playerid,9999999);
GodMode[playerid] = true;
SendClientMessage(playerid,-1,"IMORTALIDADE {21DD00}LIGADO");
}
else
{
SetPlayerHealth(playerid,hpantes);
GodMode[playerid] = false;
SendClientMessage(playerid,-1,"IMORTALIDADE{E60000}DESLIGADO");
}
return 0;
}
for(new i;i < MAX_PLAYERS; i++)
{
if(GodMode[i] == true)
{
SetPlayerHealth(i,9999999);
}
}
return 1;
}