05.01.2015, 03:26
Olб galera, estou com um problema com meu
o fake chat й um comando que vocк manda uma mensagem como se fosse o player, sу que o meu tem um problema, ele sу aparece o NICk do player, e nгo aparece a mensagem que eu digito.
Alguem consegue desvendar o problema ?
Comando:
Obrigado!!
PHP код:
"/fakechat"
Alguem consegue desvendar o problema ?
Comando:
PHP код:
if(strcmp(cmd, "/fakechat", true) == 0)
{
if(pAdmin[playerid] == 4 || pAdmin[playerid] == 5) {
new giveplayer[256];
tmp = strtok(cmdtext, idx);
new id = strval(tmp);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0xFF0000AA, "Uso: /fakechat [id] [texto]");
return 1;
}
string = strrest(cmdtext, idx);
if(!strlen(string)) {
SendClientMessage(playerid, 0xFF0000AA, "Uso: /fakechat [id] [texto]");
return 1;
}
if(!IsPlayerConnected(id)) {
SendClientMessage(playerid, 0xFFFFE0AA, "* Jogador nгo estб conectado!");
return 1;
}
GetPlayerName(id, giveplayer, sizeof(giveplayer));
format(string,sizeof(string),"[%d] %s",id,string);
SendPlayerMessageToAll(id, string);
}
else {
SendClientMessage(playerid, 0xFF0000AA, "| ERRO | Vocк nгo й administrador!");
}
return 1;
}