08.01.2013, 09:03
Hey Guys i was confusing how to Load this
Then i want to ask how to load that string?
if The God String was 1 then OnPlayerSpawn GodMode[playerid] = 1;
Sorry My English :P
pawn Код:
COMMAND:god(playerid, params[])
{
if(PlayerInfo[playerid][PlayerAdmin] == 0) return SendClientMessage(playerid,COLOR_RED, ""LEVEL_ERROR1"");
if(PlayerInfo[playerid][PlayerAdmin] >= 1)
if(GodMode[playerid] == 0)
{
SetPlayerHealth(playerid, 1000000);
GodMode[playerid] = 1; //
SendClientMessage(playerid, COLOR_WHITE, "God Mode has been actived Type /god to Deactive it");
new name[MAX_PLAYER_NAME], file[128];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"/Users/%s.txt",name);
if(fexist(file))
{
new INI:Acc = INI_Open(file);
INI_WriteInt(Acc,"God", 1); // << Save To 1
INI_Close(Acc);
}
}
else if(GodMode[playerid] == 1)
{
SetPlayerHealth(playerid, 100.0);
GodMode[playerid] = 0;
SendClientMessage(playerid, COLOR_WHITE, "God mode Deactive type /god to Active it");
new name[MAX_PLAYER_NAME], file[128];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"/Users/%s.txt",name);
if(fexist(file))
{
new INI:Acc = INI_Open(file);
INI_WriteInt(Acc,"God", 0); << Save it To 0
INI_Close(Acc);
}
}
return 1;
}
if The God String was 1 then OnPlayerSpawn GodMode[playerid] = 1;
Sorry My English :P