02.11.2012, 08:05
try this
then if work try the case n: function like you do
pawn Код:
new getgiftCcount[MAX_PLAYERS];
CMD:getgift(playerid, params[])
{
if(getgiftCcount[playerid] > 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");
}
}
getgiftCcount[playerid] = GetTickCount() + 1800000;
}
return 1;
}