problem with the connection message
#1

PHP код:
    new name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(stringsizeof(string), "{ffff66}(INFO) %s (ID %d) has joined the server"nameplayerid);
    
SendClientMessageToAll(-1string); 
when i join the server as id 0 i can see my connection message, but when i join as id 1 i can't see my connection message but others can see it, but not me, whats the problem?
Reply
#2

Код:
  new name[MAX_PLAYER][MAX_PLAYER_NAME]; 
    GetPlayerName(playerid, name[playerid], MAX_PLAYER_NAME); 
    format(string, sizeof(string), "{ffff66}(INFO) %s (ID %d) has joined the server", name, playerid); 
    SendClientMessageToAll(-1, string);
Reply
#3

Quote:
Originally Posted by iSteve
Посмотреть сообщение
Код:
  new name[MAX_PLAYER][MAX_PLAYER_NAME]; 
    GetPlayerName(playerid, name[playerid], MAX_PLAYER_NAME); 
    format(string, sizeof(string), "{ffff66}(INFO) %s (ID %d) has joined the server", name, playerid); 
    SendClientMessageToAll(-1, string);
Код:
C:\Users\Wallen\Desktop\Los Santos DeathMatch\gamemodes\DBv1.pwn(722) : error 017: undefined symbol "MAX_PLAYER"
C:\Users\Wallen\Desktop\Los Santos DeathMatch\gamemodes\DBv1.pwn(722) : error 036: empty statement
C:\Users\Wallen\Desktop\Los Santos DeathMatch\gamemodes\DBv1.pwn(723) : error 017: undefined symbol "name"
C:\Users\Wallen\Desktop\Los Santos DeathMatch\gamemodes\DBv1.pwn(723) : warning 215: expression has no effect
C:\Users\Wallen\Desktop\Los Santos DeathMatch\gamemodes\DBv1.pwn(723) : error 001: expected token: ";", but found "]"
C:\Users\Wallen\Desktop\Los Santos DeathMatch\gamemodes\DBv1.pwn(723) : error 029: invalid expression, assumed zero
C:\Users\Wallen\Desktop\Los Santos DeathMatch\gamemodes\DBv1.pwn(723) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#4

Код:
new name[MAX_PLAYERS][MAX_PLAYER_NAME]; 
    GetPlayerName(playerid, name[playerid], MAX_PLAYER_NAME); 
    format(string, sizeof(string), "{ffff66}(INFO) %s (ID %d) has joined the server", name, playerid); 
    SendClientMessageToAll(-1, string);
Reply
#5

https://i.imgur.com/E2rgcdQ.jpg

First yellow line is the connection message, but still, its id 0, if let join 1 bot and join as id 1 i wont see the connection message even if its totally wrong,.. meh lol
Reply
#6

Quote:

public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME];
new string[120];

GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s has Join the server.");
SendClientMessage(playerid,-1,string);
return 1;
}

Will work
Reply
#7

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)