02.11.2012, 07:53
pawn Код:
CMD:getgift(playerid, params[])
{
if(GetPVarInt(playerid,"GiftRequest")>GetTickCount()) return SendClientMessage(playerid, COLOR_YELLOW,"You can use this command every 30 minutes");
if(IsPlayerInRangeOfPoint(playerid, 10, -1549.7174,582.2617,7.1797))return SendClientMessage(playerid, COLOR_YELLOW,"You are not near any xmas tree.");
{
new rand = random(4);
switch(rand)
{
case 0: GivePlayerMoney(playerid, 5139525);
case 1: GivePlayerWeapon(playerid, 31, 200);
case 2: SetPlayerSkin(playerid, 264);
default: SendClientMessage(playerid, COLOR_YELLOW,"You found a present");
SetPVarInt(playerid,"GiftRequest",GetTickCount()+1800000);
}
}
return 1;
}