03.01.2012, 20:32
Hello,i've done this command:
The new;
But it crashes pawno when compling,wtf?
pawn Код:
dcmd_rob(playerid,params[])
{
if((GetTickCount() - robtime[MAX_PLAYERS]) < 120000)) return SendClientMessage(playerid,color,"You have to wait.");
if(IsPlayerInRangeOfPoint(playerid, RANGE, COORDINATES))
{
new string[120], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
robtime[MAX_PLAYERS] = GetTickCount();
format(string, sizeof(string), "%s Is Robbing .....etc", playerName);
SendClientMessageToAll(0xFFFFFFFF, string);
SetPlayerWantedLevel(playerid, 6);
GivePlayerMoney(playerid, 10000);
#pragma unused params
}
return 1;
}
pawn Код:
new robtime[MAX_PLAYERS];