[Tutorial] /me For RP Servers
#1

Most newbie might make rp and want to know how to make /me [action] CMD for example
* Tanush has punched CJ by the nose

Like if you do /me punches CJ by the nose. on server it will show to everyone * [yourname] punches CJ by the nose

ok Under OnPlayerCommandText add
pawn Код:
if(!strcmp(cmdtext, "/me", true, 3))
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        SendClientMessageToAll(0xFF9900AA, str);
        return 1;
Your script should look like
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/me", true, 3))
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        SendClientMessageToAll(0xFF9900AA, str); //I put orange cause i like it, you could change colour if you want to -.-
        return 1;
     }
     return 0;
}
pictures for example

LOOK AT SECOND LINE where it says * Zack_Bruseli shows middle finger". it will look like that

NOTICE:It's my first tutorial, i wish you like it .
Reply
#2

Explain a little more for it to be a tutorial, but ok for a first time.
Reply
#3

sure wait
Reply
#4

Explain more please, by the way this is really useful.
Reply
#5

Quote:
Originally Posted by Las Venturas CNR
View Post
Fail, you copied SA-MP Wiki, and changed the color.
https://sampwiki.blast.hk/wiki/Using_strcmp%28%29
This, and you failed to explain what everything does.
Reply
#6

1 - Copy & Paste
2 - No explanation; no tutorial
Reply
#7

should use zcmd.
Reply
#8

By the way this is not for RP servers, it shows for every player, not in a range...
Reply
#9

Quote:
Originally Posted by alpha500delta
Посмотреть сообщение
By the way this is not for RP servers, it shows for every player, not in a range...
Yes I just tried this and noticed, how would I add it to be a specific range?
Reply
#10

You can use ProxDetector (link in my signature)
But you can better use your own system, using GetNearestPlayer function (Whoever made that)
or IsPlayerInRangeOfPoint
Reply
#11

*sigh* im tired of giving these

pawn Код:
IdiotCredit[playerid] ++;
Reply
#12

Are you fucking kidding me ?
pawn Code:
SendClientMessageToAll(0xFF9900AA, str);
That's really noobish
Reply
#13

Quote:
Originally Posted by SkizzoTrick
View Post
Are you fucking kidding me ?
pawn Code:
SendClientMessageToAll(0xFF9900AA, str);
That's really noobish
How is it noobish? That's how you use that function.
Reply
#14

Quote:
Originally Posted by Finn
View Post
How is it noobish? That's how you use that function.
* SkizzoTrick is almost always using ProxDetector.Do you even imagine what chaos would be in the chat if everyone would use /me with SendClientMessageToAll.
I mean,the title says it all "/me For RP Servers" and as you can see,this is totally non-rp .
Maybe i exaggerated but im sad because everyone forgets what RP means and everyone is confusing it with NonRP servers/scripts.
Off-Topic:I just saw a stunt server called Extreme Life Roleplay ..fuck

On-Topic:Sorry Tanush for my last reaction ...this tutorial is good,everyone is able to change that "SendClientMessageToAll".
Reply
#15

Guilt Trip is why you said sorry, you can't just be saying sorry everytime after you troll/piss off someone
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)