[ajuda] SendClientMessageToAll
#1

queria que alguem me ajuda-se queria um SendClientMessageToAll
que aparecesse quando logar o id e o nick se der +rep
Reply
#2

pawn Код:
public OnPlayerConnect(playerid) {
    new string[128];
    new name[24];
    GetPlayerName(playerid, name, 24);
    format(string, 128, "Jogador %s [ID: %d] Conectado.", name, playerid);
    SendClientMessageToAll(-1, string);
    return 1;
}
Reply
#3

pawn Код:
new str[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 32);
format(str, sizeof(str), "Jogador %s ID[%d] entrou no servidor", name, playerid);
SendClientMessageToAll(-1, str);
@EDIT
u.u,,,, ja postaram oO

rssrs

mals
Reply
#4

Pra pegar o IP ficaria como?
Reply
#5

PHP код:
new pIP[16];
GetPlayerIp(playeridpIPsizeof(pIP)); 
nao tenho certeza
Reply
#6

GetPlayerIp -> https://sampwiki.blast.hk/wiki/GetPlayerIp
Reply
#7

Quote:
Originally Posted by Luciano*
Посмотреть сообщение
Pra pegar o IP ficaria como?
pawn Код:
public OnPlayerConnect(playerid)
{
    new Nome[MAX_PLAYER_NAME+1], msg[100], IP[16];
    GetPlayerName(playerid, Nome, MAX_PLAYER_NAME+1);
    GetPlayerIp(playerid, IP, 16);
    format(msg,100,"* O jogador %s[%i][IP:%s] se conectou ao servidor.",Nome,playerid, IP);
    SendClientMessageToAll(-1,msg);
    return 1;
}
Reply
#8

GetPlayerName

GetPlayerIP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)