18.12.2011, 05:43
I'll show you what would probably work in 0.3d with ZCMD
This of course, is untested.
pawn Код:
CMD:god(playerid)
{
if(IsPlayerAdmin(playerid)) //Switch with your admin system
{
if(GetPVarInt(playerid, "God") != 1)
{
SetPVarInt(playerid, "God", 1);
SendClientMessage(playerid, 0x00CC00, "God mode enabled.");
}
else
{
SetPVarInt(playerid, "God", 0);
SendClientMessage(playerid, 0x00CC00, "God mode disabled.");
}
}
else return SendClientMessage(playerid, 0xCC0000, "You don't have the required level to use this command.");
}
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(GetPVarInt(playerid, "God") == 1)
{
SetPlayerHealth(playerid, 100);
}
}