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;
}
new robtime[MAX_PLAYERS];
robtime[MAX_PLAYERS] = GetTickCount();
robtime[playerid] = GetTickCount();
if((GetTickCount() - robtime[MAX_PLAYERS]) < 120000)) return SendClientMessage(playerid,color,"You have to wait.");
This:
Код:
robtime[MAX_PLAYERS] = GetTickCount(); Код:
robtime[playerid] = GetTickCount(); Код:
if((GetTickCount() - robtime[MAX_PLAYERS]) < 120000)) return SendClientMessage(playerid,color,"You have to wait."); |
if((GetTickCount() - robtime[playerid]) < 120000)) return SendClientMessage(playerid,color,"You have to wait.");
dcmd_rob(playerid,params[])
{
#pragma unused 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);
}
return 1;
}
new Variable[500]
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;
}
if(IsPlayerInRangeOfPoint(playerid, RANGE, COORDINATES))