CMD:robshop(playerid,params[])
{
new string[180];
if(IsPlayerInDynamicCP(playerid,Checkpoint[2]))
{
RobbingCityHall[playerid] = 25;
CityHallWasRobbedRecently[playerid] = 320;
IncreaseScore(playerid, 1);
IncreaseWantedLevel(playerid,4);
format(string,sizeof(string),"~w~Robbing CityHall.~n~~r~Finish Robbery in: %d seconds.~n~~b~Police are on the way.",RobbingCityHall[playerid]);
GameTextForPlayer(playerid, string, 3000, 3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob City Hall! Get To City Hall and arrest the suspect.",GetName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at City Hall ..",GetName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
}
return 1;
}
public PlayerOneSecondVariables()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new string[128];
new pname;
if(RobbingCityHall[i] > 1)
{
RobbingCityHall[i] --;
format(string,sizeof(string),"~w~Robbing CityHall.~n~~r~Finish Robbery in: %d seconds.~n~~b~Police are on the way.",RobbingCityHall[i]);
GameTextForPlayer(i, string, 3000, 3);
}
if(RobbingCityHall[i] == 1)
{
new mrand =random(20000);
RobbingCityHall[i] =0;
format(string,sizeof(string),"~w~City Hall Robbery Complete.~n~~r~You Robbed total of $%d from City Hall.~n~~b~Watch out for police.",mrand,RobbingCityHall[i]);
GameTextForPlayer(i, string, 3000, 3);
GivePlayerMoney(i,mrand);
format(string,sizeof(string),"[ROBBERY] %s(%d) has robbed a total of $%d from City Hall! Someone is going to be killed ..",pname,i,mrand);
SendClientMessageToAll(COLOR_RED,string);
}
}
}
return 1;
}
public OnGameModeInit()
{
SetTimer("PlayerOneSecondVariables", 1000, true);
return true;;
}
Sorry for double post but it isnt the issue i get the same problem
|
public OnGameModeInit()
{
SetTimer("PlayerOneSecondVariables", 1000, true);//removed ()
return true;;
}