05.01.2010, 11:52
Hello, I am adding OnPlayerConnect and OnPlayerDisconnect messages, but I have a slight question about the nick formatting. A player will join with an RP nick for example John_Epic and when he connects, it has to say ''John Epic has joined the server'' without the underline. Is it possible? If yes, how?
P.S - Is case 3 under OnPlayerDisconnect correct? Just being curious
// EDIT: One Error.
Thanks and Regards
Puzi
P.S - Is case 3 under OnPlayerDisconnect correct? Just being curious
Код:
public OnPlayerConnect(playerid) { new pName[24]; new str[128]; GetPlayerName(playerid, pName, 24); format(str, 128, "%s has joined the server", pName); SendClientMessageToAll(COLOR_LIGHTGREEN, str); return 1; } public OnPlayerDisconnect(playerid, reason) { new pName[24]; new str[128]; GetPlayerName(playerid, pName, 24); switch(reason) { case 0: format(str, 128, "%s has left the server. (Timeout)", pName); case 1: format(str, 128, "%s has left the server. (Leaving)", pName); case 2: format(str, 128, "%s has left the server. (Kicked)", pName); case 3: format(str, 128, "%s has left the server. (Banned)", pName); } SendClientMessageToAll(COLOR_GREY, str); return 1; }
Код:
C:\Users\PUZI\Desktop\RP\gamemodes\rp-main.pwn(138) : error 017: undefined symbol "reason" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Puzi