easy ... RP
#1

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

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

use an IDE you're familiar with then
Reply
#4

IDE ?

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

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.
Reply
#6

What is Prox Detector ? !
Reply
#7

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
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)