03.01.2012, 22:47
pawn Код:
new Variable[500]
if you use [MAX_PLAYERS] in any loop, it ill be an "out of bounds" error. your simple mistake was the playerid instead of MAX_PLAYERS:
pawn Код:
dcmd_rob(playerid,params[])
{
if((GetTickCount() - robtime[playerid]) < 120000)) return SendClientMessage(playerid,0xff0000ff,"You have to wait.");
if(IsPlayerInRangeOfPoint(playerid, 10.0000, 0.0000,0.0000,0.0000))
{
new string[120], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
robtime[playerid] = GetTickCount();
format(string, sizeof(string), "%s Is Robbing .....etc", playerName);
SendClientMessageToAll(0xFFFFFFFF, string);
SetPlayerWantedLevel(playerid, 6);
GivePlayerMoney(playerid, 10000);
}
return 1;
}
oh, and where are the coodrinates and the radius for
Код:
if(IsPlayerInRangeOfPoint(playerid, RANGE, COORDINATES))