Roleplay Chat Commands [zcmd]
#1

//=========================== [Chat Commands]=================================//

// OOC

Код:
COMMAND:o(playerid, params[])
{
    new sendername[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerName(playerid, sendername, sizeof(sendername)); 
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Use /o (OOC-G)");
    format(string, sizeof(string), "((OOC)): %s %s ", sendername, params);
    ProxDetector(9999.0, playerid, string, COLOR_GREY);
    return 1;
}

COMMAND:ooc(playerid, params)
{
	return cmd_ooc(playerid, params);
}
// Local OCC

COMMAND:l(playerid, params[])
    {
    new sendername[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "Use /l (Text)");
    format(string, sizeof(string), "((OOC-L)) %s %s ", sendername, params);
    ProxDetector(20.0, playerid, string, COLOR_GREY);
    return 1;
}

// Me

COMMAND:me(playerid, params[])
{
    new sendername[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(isnull(params)) return SendClientMessage(playerid, 0xFFFF00AA, "[USAGE]: /me [acion]");
    format(string, sizeof(string), "%s %s", sendername, params);
    ProxDetector(10.0, playerid, string, COLOR_LIGHTBLUE);
    return 1;
}
Hope this helped =)
Reply
#2

So what's your problem exactly ?
Or are you just showing this snippet to us ?
Reply
#3

I noticed a problem there even if its a snippet or not.
pawn Код:
COMMAND:ooc(playerid, params)
{
    return cmd_ooc(playerid, params);
}
Your just returning the command the player typed, therefore doing nothing...
Reply
#4

Working !!
Reply
#5

It should be like this

pawn Код:
COMMAND:ooc(playerid, params)
{
    return cmd_o(playerid, params);
}
Reply
#6

Post this in the snippets section..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)