SA-MP Forums Archive
/me COMMAND help for roeplay - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /me COMMAND help for roeplay (/showthread.php?tid=326651)



/me COMMAND help for roeplay - Alexy_Dramon - 18.03.2012

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?


Re: /me COMMAND help for roeplay - antonio112 - 18.03.2012

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;
}



Re: /me COMMAND help for roeplay - doreto - 18.03.2012

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


Re: /me COMMAND help for roeplay - Reklez - 18.03.2012

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;
}



Re: /me COMMAND help for roeplay - Kaczmi - 18.03.2012

Код:
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;
}



Re: /me COMMAND help for roeplay - doreto - 18.03.2012

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


Re: /me COMMAND help for roeplay - Reklez - 18.03.2012

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))


Re: /me COMMAND help for roeplay - Alexy_Dramon - 18.03.2012

Thanks Guys