01.05.2011, 20:10
pawn Код:
if (strcmp("/adminammunition", cmdtext, true) == 0)
{
if(isPlayerAnAdmin(playerid,2))
{
new ammun = GetPVarInt(playerid, "ammunition");
if (ammun) return 1;
SetPVarInt(playerid, "ammunition", 1);
SetTimerEx("resetammun", 600 * 1000, false, "i", playerid);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,31,100);
GivePlayerWeapon(playerid,41,500);
SendClientMessage(playerid,0xFF66FFAA," You get admin ammunition.");
return 1;
}
else
{
SendClientMessage(playerid,0x4B00B0AA,"You are not an admin...");
}
return 1;
}
// Put this code at the end of your script:
public resetammun(playerid)
{
SetPVarInt(playerid, "ammunition", 0);
return 1;
}
