25.09.2013, 09:06
Hey all!
I made a bank robbery system and i made in it count of the cops in the server - each cop logins to the server so counting +1, the problem is when the cop disconnect its still +1 and not -1, what's wrong?
For bank robbery the robber needs at least 4 cops online.... 4 connected and one leave - he still can rob... :/
there is the code of cop counting online:
I made a bank robbery system and i made in it count of the cops in the server - each cop logins to the server so counting +1, the problem is when the cop disconnect its still +1 and not -1, what's wrong?
For bank robbery the robber needs at least 4 cops online.... 4 connected and one leave - he still can rob... :/
there is the code of cop counting online:
Код:
#pragma unused params if(IsPlayerConnected(playerid)) { for(new i = 0; i < MAX_PLAYERS; i ++) { if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1) { LEOOnline++; } } if(LEOOnline < 4) { SendClientMessage(playerid, COLOR_GRAD3, "You need at least 4 Law Enforcement officers!"); return 1; }