Help Me out
#1

This dialog is bugged when i login i see the message but i wont see it just the other players on the family
PHP код:
            foreach(Playeri)
            {
                if(
PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && PlayerInfo[i][pFaction] != 0)
                {
                    
format(stringsizeof(string), "*** %s from your faction has loggedin"GetPlayerNameEx(playerid));
                    
SendClientMessage(iCOLOR_JUNIORADMINstring);
                }
                if(
PlayerInfo[i][pGang] == PlayerInfo[playerid][pGang] && PlayerInfo[i][pGang] != 255)
                {
                    
format(stringsizeof(string), "*** %s from your gang has loggedin"GetPlayerNameEx(playerid));
                    
SendClientMessage(iCOLOR_JUNIORADMINstring);
                }
                
            } 
Reply
#2

Man, Told you, don't edit anything leave the code as i gave you
PHP код:
for(new 0GetPlayerPoolSize(); i++)

                if(
PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && PlayerInfo[i][pFaction] != 0
                { 
                    new 
Name[MAX_PLAYER_NAME], string[100];
                    
GetPlayerName(playeridNamesizeof(Name));
                    
format(stringsizeof(string), "*** %s from your faction has logged in"Name); 
                    
SendClientMessage(iCOLOR_JUNIORADMINstring); 
                } 
                if(
PlayerInfo[i][pGang] == PlayerInfo[playerid][pGang] && PlayerInfo[i][pGang] != 0
                { 
                    new 
Name[MAX_PLAYER_NAME], string[100];
                    
GetPlayerName(playeridNamesizeof(Name));
                    
format(stringsizeof(string), "*** %s from your gang has loggedin"Name); 
                    
SendClientMessage(iCOLOR_JUNIORADMINstring); 
                } 
                 

Reply
#3

Your code isn't an improvement, Arbico.

OP:

Debug it. print() what needs to be called and check the server_logs after to see if it works.
Reply
#4

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Your code isn't an improvement, Arbico.

OP:

Debug it. print() what needs to be called and check the server_logs after to see if it works.
Check the if statement, Changed a number, that could be the problem
Plus some foreach includes are different. there are different versions that the way we use it is changed, So that could be the problem too.
Reply
#5

Free suggestion, in the PlayerInfo enum put this "PlayerName[24]".
Under OnPlayerConnect do:
Код:
GetPlayerName(playerid, PlayerInfo[playerid][PlayerName], 24);
So no need to get a player name 2000 times, until in your server a player can change his name of course.
Код:
            foreach(Player, i)
            {
                if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && PlayerInfo[i][pFaction] != 0)
                {
                    format(string, sizeof(string), "*** %s from your faction has loggedin", PlayerInfo[playerid][PlayerName]);
                    SendClientMessage(i, COLOR_JUNIORADMIN, string);
                }
                if(PlayerInfo[i][pGang] == PlayerInfo[playerid][pGang] && PlayerInfo[i][pGang] != 255)
                {
                    format(string, sizeof(string), "*** %s from your gang has loggedin", PlayerInfo[playerid][PlayerName]);
                    SendClientMessage(i, COLOR_JUNIORADMIN, string);
                }
                
            }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)