Posts: 447
Threads: 105
Joined: Feb 2013
Hi, im wondering how is possible to count the players which join dm, for example someone goto /minigun
count them as +1 and show in textdraw anyone can give me an exam simple one ? ,thanks!
Posts: 447
Threads: 105
Joined: Feb 2013
Quote:
Originally Posted by Konstantinos
pawn Код:
new MinigunCount;
// OnGameModeInit or OnFilterScriptInit: MinigunCount = 0;
// when a player joins /minigun (be sure that if a player is already is minigun and type it, it won't count again. Add it at the bottom of the command MinigunCount++;
// When a player leaves the /minigun: MinigunCount--;
// When you want to display it to a textdraw, format a string and "MinigunCount" holds the players' count.
|
What about if player left DeathMatch? i mean i put under onplayerdeath miniguncount--?
Posts: 52
Threads: 9
Joined: Jan 2012
Reputation:
0
On exit DeathMatch command put MinigunCount--;
And don't forget OnPlayerDisconnect...put there something like this, but with your variables
if(minigun[playerid] == 1)
MinigunCount--;
And if player leaves DM zone when he dies then put MinigunCount--; on OnPlayerDeath
EDIT: Didn't see your last post Konstantinos