SA-MP Forums Archive
easy ... RP - 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: easy ... RP (/showthread.php?tid=545890)



easy ... RP - C0olp1x - 11.11.2014

So i'm new to pawno and i tried to make command /me, /do and /b (OOC).
Can u plss help me ?


Re: easy ... RP - Toxik - 11.11.2014

Search on "******"!
SA-MP commends
* Toxik /do /b tutorial


Re: easy ... RP - KingHual - 11.11.2014

use an IDE you're familiar with then


Re: easy ... RP - C0olp1x - 11.11.2014

IDE ?

I searched on ****** but there are only old versions ... so i couldn't find new one ..


Re: easy ... RP - HY - 11.11.2014

pawn Код:
CMD:me(playerid, params[])
{
    new Action;
    if(sscanf(params,"i", Action)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
    new str[128];
    new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "* %s %s", str, name, Action);
    SendClientMessageToAll(0xFFFF00AA, str);
    return 1;
}
pawn Код:
CMD:do(playerid, params[])
{
    new, string[128], action[100];
    if(sscanf(params, "s[100]", action))
    {
        SendClientMessage(playerid, -1, "USAGE: /do [action]");
        return 1;
    }
    else
    {
        format(string, sizeof(string), "* %s (( %s ))", action, GetName(playerid));
        ProxDetector(30, playerid, string, COLOR_PURPLE);
    }
    return 1;
}
pawn Код:
CMD:b(playerid, params[])
{
    new str[128];
    new OOC;
    if(sscanf(params,"i", OOC)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /b [OOC Chat]");
    new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s ((%s))", name, OOC);
    SendClientMessageToAll (COLOR_WHITE, str);
    return 1;
}
I didn't have your Prox Detector, so you could add it.


Re: easy ... RP - C0olp1x - 11.11.2014

What is Prox Detector ? !


Re: easy ... RP - HY - 11.11.2014

With Prox Detector will sends /Me, /Do, /B messages only at 30 metres distance. Or 40, 50, depends how do you want.

https://sampforum.blast.hk/showthread.php?tid=293088


Re: easy ... RP - dominik523 - 11.11.2014

Quote:
Originally Posted by HY
Посмотреть сообщение
...
I didn't have your Prox Detector, so you could add it.
If you ask me, all that code is useless. You could send tutorials to that guy, not just give him the code and that's it.

OT: To understand how to create any type of a command, you will have to learn how to write commands using ZCMD and sscanf.
Here is a tutorial which explains how to use that two includes together:
https://sampforum.blast.hk/showthread.php?tid=300397
And one small suggestion, if you don't know how to create stocks/functions or arrays, don't try anything with commands right now and learn the basics.