{
new string[256];
format(string, 256, "%s estб online.", plname);
SendClientMessageToAll(0xFF0000AA ,string);
}
{
new string[256];
format(string, 256, "%s estб offline.", plname);
SendClientMessageToAll(0xFF0000AA ,string);
}
{
//new string[256]; 256 й um valor muito grande vocк nгo vai usar nem METADE
new string[40];
format(string, sizeof(string), "%s estб offline.", plname);
SendClientMessageToAll(0xFF0000AA ,string);
}
public OnPlayerDisconnect(playerid, reason)
{
switch(reason)
{
case 0: format(string, sizeof(string), "{00D5FF}%s {FFFFFF}se desconectou do servidor. {7CFC00}[Crash]", GetPlayerNameEx(playerid));
case 1: format(string, sizeof(string), "{00D5FF}%s {FFFFFF}se desconectou do servidor. {7CFC00}[Conta Prуpria]", GetPlayerNameEx(playerid));
case 2: format(string, sizeof(string), "{00D5FF}%s {FFFFFF}se desconectou do servidor. {7CFC00}[Kickado ou Banido]", GetPlayerNameEx(playerid));
SendClientMessageToAll(-1, string);
}
return 1;
}
stock GetPlayerNameEx(playerid)
{
new STRING[MAX_PLAYER_NAME];
GetPlayerName(playerid, STRING, sizeof STRING);
return STRING;
}
|
DICA: diminua o valor da string
pawn Код:
|
|
DICA: diminua o valor da string
pawn Код:
|
{
//new string[256]; 256 й um valor muito grande vocк nгo vai usar nem METADE
new string[15];
format(string, sizeof(string), "%s estб offline.", plname);
SendClientMessageToAll(0xFF0000AA ,string);
}
|
diminua mais!
pawn Код:
|
|
se o nome do player for 15 caracteres nгo irб aparecer o resto... 'Estб offline'..
|
new string[MAX_PLAYER_NAME+10];
format(string, sizeof(string), "%s estб offline.", plname);
SendClientMessageToAll(0xFF0000AA ,string);