Participants - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Participants (
/showthread.php?tid=450392)
Participants -
z3r0w1zard - 12.07.2013
Hello i need help when i start event and player join in event need wait 30 Seconda for event start and when event start tell Participants of player.
Thanks
Re: Participants -
z3r0w1zard - 12.07.2013
anyone?
Re: Participants -
MrCoder - 12.07.2013
Add a timer to the command then forward it to perform the command.
Re: Participants -
z3r0w1zard - 12.07.2013
ahh you dont understand i dont want timer when event start tell how much player have join in event with Number
Respuesta: Participants -
PHudson - 13.07.2013
pawn Код:
new Event[MAX_PLAYERS];
// When a player joins the event:
Event[playerid] = 1;
// When a player leaves the event or disconnects:
Event[playerid] = 0;
// When you want to count participants and show the count to playerid:
new participants,msg[144];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && Event[i]) participants++;
}
format(msg,sizeof(msg),"There are %i participants.",participants);
SendClientMessage(playerid,-1,msg);