String Command error
#10

'/n' : It's only for dialog text, and you can't use it into a 'SendClientMessage' , it won't work.

Test if it's working
Actually, Sew_Sumi has already noticed it for you
Quote:
Originally Posted by Sew_Sumi
View Post
And what you're doing in that format in the first example in admins command, won't work as that's not how you use format, and pass things to SendClientMessage.
PHP Code:
CMD:admins(playeridparams[])
{
    if(
pInfo[playerid][pHour] >= 0)
    {
        new 
adminstring[128];
        new 
text[128];
        if(
IsPlayerConnected(playerid))
        {
            for (new 
0MAX_PLAYERSi++)
            {
                if(
IsPlayerConnected(i))
                {
                    if(
pInfo[i][pAdminLevel] > 0)
                    {
                        
format(adminstringsizeof(adminstring),"%s %s / %s"GetAdminName(i), PlayerName(i), ForumName(i));
                        
format(textsizeof(text),"Administratori Online");
                    }
                }
            }
            
SendClientMessage(playerid,COLOR_WHITEtext);
            
SendClientMessage(playerid,COLOR_GREENadminstring);
        }
         
//else return SendClientMessage(playerid,-1,"*"COL_LGREEN" Nici un admin online"); Currently this message it won't be showed to the players.
    
}
    return 
1;

Reply


Messages In This Thread
String Command error - by Zeus666 - 13.03.2018, 20:56
Re: String Command error - by Zeus666 - 13.03.2018, 21:10
Re: String Command error - by AdamsLT - 13.03.2018, 21:32
Re: String Command error - by Zeus666 - 13.03.2018, 21:43
Re: String Command error - by Zeus666 - 14.03.2018, 09:37
Re: String Command error - by Sew_Sumi - 14.03.2018, 09:44
Re: String Command error - by Zeus666 - 14.03.2018, 10:23
Re: String Command error - by Sew_Sumi - 14.03.2018, 11:41
Re: String Command error - by Zeus666 - 14.03.2018, 11:48
Re: String Command error - by Maximun - 14.03.2018, 12:51

Forum Jump:


Users browsing this thread: 1 Guest(s)