/me COMMAND help for roeplay
#1

hello guys i taked one command (/me)
but it's ain't working
this is Command\
Код:
CMD:me(playerid, params[])
{
    new string[128],msg[128],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params,"sz",msg)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /me <text>");
    format(string,sizeof(string),"*%s %s",pname,msg);
    SendClientMessageToAll(COLOR_GREY,string);
    return 1;
}
well when i typing IG
* Alexy_Dramon Looks at Luka
it's send Only the
Looks"
LOLS
how make that it's willsend the full Text?
Reply
#2

pawn Код:
CMD:me(playerid, params[])
{
    new string[128],msg[100],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(sscanf(params,"s[100]",msg)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /me <text>");
    format(string,sizeof(string),"*%s %s",pname,msg);
    SendClientMessageToAll(COLOR_GREY,string);
    return 1;
}
Reply
#3

Did you have to many ever problem commands on new topic ? why you first dont search then post im sure there there alot /me commands
Reply
#4

you do not need sscanf for that you could just

pawn Код:
CMD:me(playerid, params[])
{
     new string[128], pname[MAX_PLAYER_NAME];
     GetPlayerName(playerid, pname, sizeof(pname));
     if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /me <text>");
     format(string,sizeof(string),"*%s %s",pname,msg);
     SendClientMessageToAll(COLOR_GREY,string);
     return 1;
}
Reply
#5

Код:
CMD:me(playerid, params[])
{
    new string[128],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /me <text>");
    format(string,sizeof(string),"*%s %s",pname,params);
    SendClientMessageToAll(COLOR_GREY,string);
    return 1;
}
Reply
#6

Quote:
Originally Posted by Kaczmi
Посмотреть сообщение
Код:
CMD:me(playerid, params[])
{
    new string[128],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /me <text>");
    format(string,sizeof(string),"*%s %s",pname,params);
    SendClientMessageToAll(COLOR_GREY,string);
    return 1;
}
lol its same from about its 1:1 copy from Reklez
Reply
#7

Quote:
Originally Posted by doreto
Посмотреть сообщение
lol its same from about its 1:1 copy from Reklez
he doesn't copy it look we have the same time post

Код:
8:02 AM
he is just little seconds late

EDIT:

You didn't see this line from his code?

pawn Код:
if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /me <text>");
i use isnull and he use strlen

Quote:
Originally Posted by Kaczmi
Посмотреть сообщение
Код:
CMD:me(playerid, params[])
{
    new string[128],pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /me <text>");
    format(string,sizeof(string),"*%s %s",pname,params);
    SendClientMessageToAll(COLOR_GREY,string);
    return 1;
}
or you can just use if(isnull(params))
Reply
#8

Thanks Guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)