[Pedido] ajeitar esse comando /me
#1

olб pessoal, alguma alma experiente e caridosa rss poderia arrumar esse comando /me por favor, nda que eu faзo dб certo lol!!!!
tipo ele sу posta o nick mas nada do que se escreve, pelo que pesquisei atй agora й algo relacionado ao segundo %s
vlw abg abs!!!!

PHP код:
CMD:me(playeridparams[])
  {
        if(!
strlen(params))return SendClientMessage(playerid0xFF0000FF"USAGE: /me [action]");
    new 
str[128];
    
GetPlayerName(playeridstrsizeof(str));
    
format(strsizeof(str), "* %s %s"str, !strlen(params));
    
SendClientMessageToAll(0xFFFF00AAstr);
    return 
1;
  } 
Reply
#2

pawn Код:
#include <a_samp>
#include zcmd
#include sscanf


command(eu, playerid, params[])
{
    new texto[120];
    if(sscanf(params,"s", texto)) return SendClientMessage(playerid, -1 "Use /eu texto");
   
    new string[120], nome[25];
    GetPlayerName(playerid, nome, 25);
   
    format(string, sizeof(string), "* %s: %s", nome, texto);
    SendClientMessageToAll(0xFFFF00AA, string);
    return 1;
}
Reply
#3

Opa Duun deu erros mas foi na leitura da include sscanf, mas to comparando os dois comandos e dando umas fuзadas aqui!!!!
Reply
#4

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

CMD:me(playerid, params[])
{
    if(sscanf(params,"s[128]", params[0]))
        return SendClientMessage(playerid, 0xFF0000FF "Use: /me texto");
   
    new str[128], nome[MAX_PLAYER_NAME];
    format(str, sizeof(str), "* %s: %s", (GetPlayerName(playerid, nome, MAX_PLAYER_NAME), nome), params[0]);
    SendClientMessageToAll(0xFFFF00AA, str);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)