14.04.2011, 00:23
Quote:
|
He wouldn't be able to use this. It would only work if all 500 player slots were filled.
Not quite sure how you could do this. I'm sure a more experienced Pawn Programmer will know how to do this properly. |
Example:
Код:
new totalplayers; public OnPlayerConnect(playerid) { if(totalplayers < GetMaxPlayers()) totalplayers++; return 1; } public OnPlayerDisconnect(playerid) { if(totalplayers > 0) totalplayers--; return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_CROUCH) { SendClientMessage(playerid,0xFFFFFFFF, "WORKING"); new randomid = random(totalplayers); TogglePlayerControllable(randomid, false); SendClientMessage(randomid,0xFFFFFFFF, "You've been freezed by someone."); } return 1; }


