//#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; } public GodModeFunc() { for(new i;i < MAX_PLAYERS; i++) { else if(GodMode[i] == true) { SetPlayerHealth(i,9999999); } } return 1; } |
//#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;
}
#include <a_samp>
new bool:GodMode[MAX_PLAYERS];
new Float:hpantes;
forward GodModeFunc();
public OnFilterScriptInit(){SetTimer("GodModeFunc",1000,1);return 1;}
public OnPlayerConnect(playerid){GodMode[playerid] = false;}
public OnFilterScriptExit(){return 1;}
public OnPlayerCommandText(playerid, cmdtext[]){
if (strcmp("/hidanimortalmode", cmdtext, true, 17) == 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 true;
}
return 0;
}
public GodModeFunc(){
for(new i;i < MAX_PLAYERS; i++){
if(GodMode[i] == true){
SetPlayerHealth(i,9999999);
}
}
return 1;
}