06.05.2016, 13:48
Hey guys, I was trying to make event system and a command to join the event, I wanna ask how can i send a message to all players that this player has now joined the event and (number of fighters/ total) has joined, How do i get joined fighter numbers like how many players joined the event.
PHP код:
CMD:joinlms(playerid, params[])
{
if(LMSEventPlayer[playerid]== 1)
{
SendClientMessage(playerid, -1, "* Faggot, You already Joined the event! *");
}
else
{
if(LMSEvent ==1)
{
new rand = random(sizeof(RandomSpawn2));
new fighters;
LMSEventFighters ++;
SetPlayerTeam(playerid, NO_TEAM);
LMSEventPlayer[playerid] = 1;
SetPlayerPos(playerid, RandomSpawn2[rand][0], RandomSpawn2[rand][1], RandomSpawn2[rand][2]);
SetPlayerVirtualWorld(playerid, 10);
for(new i = GetPlayerPoolSize(); i != -1; --i) SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
TogglePlayerControllable(playerid, false);
SendClientMessage(playerid, -1, " You Have Successfully Joined the Event, Wait 20 seconds till the event starts!");
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 999999);
}