13.03.2011, 18:18
Alright, I have a robbing command for my server, you type /robstore and it allows you to rob the blueberry liquor store.
The only problem is that you don't gain cash from it, anyone know why?
Also how would you make it so that it can only be robbed every 20-30 minutes
The only problem is that you don't gain cash from it, anyone know why?
pawn Код:
command(robstore, playerid, params[])
{
if(PlayerToPoint(3, playerid,252.249,-56.554,0.755))
{
new sendername[MAX_PLAYER_NAME];
new string [200];
GetPlayerName(playerid, sendername, sizeof(sendername));
new robmoney = random(20000);
SendClientMessage(playerid, 0xFF0000FF, " You have started to rob the Liquer Store. ");
SendClientMessageToAll(RED, "The Liquer Store in Blueberry is being robbed! ALL Police units respand immediately!");
SendClientMessage(playerid, YELLOW, "You have been seen on the security cameras! Run away!");
format(string, sizeof(string), "** You have successfully stolen $%d!",robmoney);
SendClientMessage(playerid,YELLOW,string);
GivePlayerMoney(playerid, robmoney);
}
return 1;
}