Plss help Near by msg +REP
#4

Install sscanf.
Code for /me
pawn Код:
if(strcmp(cmdtext, "/me", true) == 0)
{
    new msg [145], name[MAX_PLAYER_NAME], str [145];
    GetPlayerName(playerid, name, sizeof(name));
    if(sscanf(cmdtext, "z[144]", msg))
    {
        SendClientMessage(playerid, -1, "Usage : /me [action]");
    }
    else
    {
        format(str, sizeof(str), "%s %s", name, msg);
        SendClientMessageToAll(-1, str) ;
    }
    return 1;
}
Code for /do
pawn Код:
if(strcmp(cmdtext, "/do", true) == 0)
{
    new msg[145], str [145], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name , sizeof(name));
    if(sscanf(cmdtext, "z[144]", msg))
    {
        SendClientMessage(playerid, -1, "Usage : /do [action]");
    }
    else
    {
        format(str, sizeof(str), "%s (( %s ))", msg, name);
        SendClientMessageToAll(-1, str);
    }
    return 1;
}
Reply


Messages In This Thread
Plss help Near by msg +REP - by C0olp1x - 13.11.2014, 08:07
Re: Plss help Near by msg +REP - by LaPiMoNsTeR - 13.11.2014, 08:15
Re: Plss help Near by msg +REP - by C0olp1x - 13.11.2014, 08:18
Re: Plss help Near by msg +REP - by LaPiMoNsTeR - 13.11.2014, 08:30
Re: Plss help Near by msg +REP - by C0olp1x - 13.11.2014, 08:32
Re: Plss help Near by msg +REP - by Banana_Ghost - 13.11.2014, 08:40
Re: Plss help Near by msg +REP - by LaPiMoNsTeR - 13.11.2014, 08:45

Forum Jump:


Users browsing this thread: 3 Guest(s)