02.04.2014, 13:56
there is some problem with barckets i think its really confusing use like this and try --
pawn Код:
CMD:robpizza(playerid,params[])
{
if(gteam[playerid] == TEAM_CIV)return SendClientMessage(playerid,COLOR_RED,"(Error): You must be civilian to use this command!");
if(IsPlayerInRangeOfPoint(playerid, 2.0,373.825653,-117.270904,1001.499511))return ErrorMessages(playerid,4);
if(alreadyrobbed[playerid] == 0)return SendClientMessage(playerid,COLOR_RED,"(Error): You have already robbed the shop!Try Later!");
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);
}
return 1;
}
public PizzaRob(playerid)
{
alreadyrobbed[playerid] = 0;
return 1;
}