08.07.2011, 02:32
Well, now it's fixed
))))
Another issue has risen. I can't figure out what's wrong.
The SetGVarInt(); isn't working. I've tried with "new robbed;" and it worked fine. SetGVarInt(); just isn't working.
Code
Any ideas?
![Smiley](images/smilies/smile.png)
Another issue has risen. I can't figure out what's wrong.
The SetGVarInt(); isn't working. I've tried with "new robbed;" and it worked fine. SetGVarInt(); just isn't working.
Code
Код:
if(listitem == 5) { if(gTeam[playerid] == Team_Cop || gTeam[playerid] == Team_FBI || gTeam[playerid] == Team_Army) { SendClientMessage(playerid, COLOR_ERROR, "You cannot attempt robbery."); return 1; } if(getCheckpointType(playerid) != CP_StoreOne) { SendClientMessage(playerid, COLOR_ERROR, "You must be in the 69 Cent store checkpoint to attempt robbery."); return 1; } if(GetGVarInt("SixNineRobbed") == 1337) { SendClientMessage(playerid, COLOR_ERROR, "The 69 Cent store has been robbed recently."); return 1; } new crand = random(100); if(crand > 10) { new mrand = random(100000); format(string, sizeof(string), "[ROBBERY]%s(%d) has robbed $%d from the 69 Cent Store in Los Santos (Train Station)", pname, playerid, mrand); GivePlayerMoney(playerid, mrand); SendClientMessageToAll(COLOR_LIGHTBLUE, string); IRC_Say(gGroupID, IRC_CHANNEL, string); SetGVarInt("SixNineRobbed", 1337); SetTimer("SixNineStoreRobAgain", 1000*60*5, 0); IncreaseWantedLevel(playerid, 2); IncreaseScore(playerid, 1); format(string, sizeof(string), "[ROBBERY]%s(%d) has robbed the 69 Cent Store. Go arrest him now.", pname, playerid); SendCopMessage(string); return 1; } else { format(string, sizeof(string), "%s(%d) has failed a robbery at the 69 Cent Store in Los Santos (Train Station)", pname, playerid); SendClientMessageToAll(COLOR_LIGHTBLUE, string); IRC_Say(gGroupID, IRC_CHANNEL, string); } return 1; } return 1; }