Event Help
#1

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(playeridparams[])
{
    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(playeridNO_TEAM);
    
LMSEventPlayer[playerid] = 1;
    
SetPlayerPos(playeridRandomSpawn2[rand][0], RandomSpawn2[rand][1], RandomSpawn2[rand][2]);
    
SetPlayerVirtualWorld(playerid10);
    for(new 
GetPlayerPoolSize(); != -1; --iSetPlayerMarkerForPlayer(iplayerid0xFFFFFF00);
    
TogglePlayerControllable(playeridfalse);
    
SendClientMessage(playerid, -1" You Have Successfully Joined the Event, Wait 20 seconds till the event starts!");
    
ResetPlayerWeapons(playerid);
    
GivePlayerWeapon(playerid24999999);
    } 
Reply
#2

Hello.
Like this ?
PHP код:
CMD:joinlms(playeridparams[])
{
    if(
LMSEventPlayer[playerid]== 1)
    {
        
SendClientMessage(playerid, -1"* Faggot, You already Joined the event! *");
    }
    else if(
LMSEvent ==1)
    {
        new 
rand random(sizeof(RandomSpawn2));
        new 
fightersstr[120], name[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnamesizeof(name));
        
LMSEventFighters ++;
        
SetPlayerTeam(playeridNO_TEAM);
        
LMSEventPlayer[playerid] = 1;
        
SetPlayerPos(playeridRandomSpawn2[rand][0], RandomSpawn2[rand][1], RandomSpawn2[rand][2]);
        
SetPlayerVirtualWorld(playerid10);
        for(new 
GetPlayerPoolSize(); != -1; --iSetPlayerMarkerForPlayer(iplayerid0xFFFFFF00);
        
TogglePlayerControllable(playeridfalse);
        
SendClientMessage(playerid, -1" You Have Successfully Joined the Event, Wait 20 seconds till the event starts!");
        
format(strsizeof(str), "%s joined an event ! (Players : %i/Total)"nameLMSEventFighters);
        
SendClientMessageToAll(-1str);
        
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid24999999);
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)