02.04.2014, 14:20
change it to this
pawn Код:
CMD:robpizza(playerid,params[])
{
if(gteam[playerid] != TEAM_CIV)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0,373.825653,-117.270904,1001.499511))
{
if(alreadyrobbed[playerid] == 0)
{
if(isrobbing[playerid] == 0)
{
isrobbing[playerid] = 1;
new string[190],string2[160],gname[MAX_PLAYER_NAME], gmoney = random(6000);
GetPlayerName(playerid,gname,sizeof(gname));
alreadyrobbed[playerid] = 1;
GivePlayerMoney(playerid,gmoney);
pinfo[playerid][Money] = pinfo[playerid][Money]+gmoney;
IncreasePlayerWantedLevel(playerid,4);
SetTimerEx("PizzaRob",60000,false,"i",playerid);
format(string2,sizeof(string2),"Succeed: You have robbed Pizza Stack Shop and earned %d from the robbery!!Cops will be around!",gmoney);
SendClientMessage(playerid,COLOR_GREEN,string2);
pinfo[playerid][TotalRobs]++;
format(string,sizeof(string),"WARNING: %s player has robbed Pizza Stack and earned %d from the robbery!!Please respond immediately",gname,gmoney);
SendCopMessage(string);
}
else
{
SendClientMessage(playerid,COLOR_RED,"(Error): You have already robbed the shop!Try Later!");
}
}
else
{
ErrorMessages(playerid,4);
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"(Error): You must be civilian to use this command!");
}
}
return 1;
}
public PizzaRob(playerid)
{
alreadyrobbed[playerid] = 0;
return 1;
}