RP script help
#1

Hey,

I m making a RP script but have a problem need some help.

I need help with the code for making a

I need the commands like /help, /admins, /o, /n, /b, /w, /ah, /aduty.


I can try and think of the rest by myself

DCMD!
Reply
#2

Well you're not telling us what those commands are for so how can we help you? There are also a bunch of tutorials for making cmds + the wiki
Reply
#3

they are for a roleplay script i am making . But i read them and still not a clue on there commands
Reply
#4

......yeah. And by "/o", we should instantly know what it does.
And here's a tip for you: THINK FOR YOURSELF! Come on, it ain't that hard.
Just write down the steps needed to give you the wanted resul(s).

For example:
Quote:

/admins
- Check all the players
- Is a player admin?
- If so, do blabla

After that, write the code.
Reply
#5

They are in ZCMD, just change them into dcmd its easy. Or use ZCMD its better than DCMD

pawn Код:
COMMAND:help(playerid, params[])
{
    SendClientMessage(playerid, COLOR_YELLOW, "*****************************[COMMANDS:]***************************");
    SendClientMessage(playerid, COLOR_WHITE, "[WHAT ARE THE COMMANDS FOR:] WRITE YOUR COMMANDS HERE");
    SendClientMessage(playerid, COLOR_WHITE, "[WHAT ARE THE COMMANDS FOR:] WRITE YOUR COMMANDS HERE");
    SendClientMessage(playerid, COLOR_WHITE, "[WHAT ARE THE COMMANDS FOR:] WRITE YOUR COMMANDS HERE");
    SendClientMessage(playerid, COLOR_YELLOW, "***************************************************************************");
    return true;
}
pawn Код:
COMMAND:o(playerid, o[], help)
{
    #pragma unused help
    new name[ MAX_PLAYER_NAME ], string[ 128 ];
    if(isnull(o)) return SendClientMessage(playerid, COLOR_LIGHTBLUE -1,"[SYNTAX]: /o(oc) [text]");
    if(ooc == false && !IsPlayerAdmin( playerid )) return SendClientMessage(playerid, COLOR_RED -1,"[INFO]: OOC Chat is disabled");
    GetPlayerName(playerid, name, sizeof( name ));
    format(string, sizeof(string),"[OOC Chat] %s: %s", RemovePlayerUnderscoreString(Character[playerid][cName]));
    SendClientMessageToAll(COLOR_ROYALBLUE -1, string);
    return 1;
}

COMMAND:enableooc(playerid, o[], help)
{
    #pragma unused help
     if(IsPlayerAdmin(playerid)) SendClientMessage(0xDEEE20FF, "ERROR.");
    ooc = true;
    SendClientMessageToAll(COLOR_LIGHTGREEN -1,"[INFO]: OOC Chat has been enabled");
    return 1;
}
COMMAND:disableooc(playerid, o[], help)
{
    #pragma unused help
     if(IsPlayerAdmin(playerid)) SendClientMessage(0xDEEE20FF, "ERROR.");
    if(ooc == true)
    {
        ooc = false;
        SendClientMessageToAll(COLOR_LIGHTGREEN -1,"[INFO]: OOC Chat has been disabled");
    }
    return 1;
}
Change the
pawn Код:
if(IsPlayerAdmin(playerid)) SendClientMessage(0xDEEE20FF, "ERROR.");
to the one you use to check if the player is an admin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)