SA-MP Forums Archive
Roleplay Chat Commands [zcmd] - 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: Roleplay Chat Commands [zcmd] (/showthread.php?tid=308240)



Roleplay Chat Commands [zcmd] - GtasaPoliceModz - 02.01.2012

//=========================== [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 =)


AW: Roleplay Chat Commands [zcmd] - Drebin - 02.01.2012

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


Re: Roleplay Chat Commands [zcmd] - LiamM - 02.01.2012

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


Re: Roleplay Chat Commands [zcmd] - parames3010 - 03.01.2012

Working !!


Re: Roleplay Chat Commands [zcmd] - Spooky - 03.01.2012

It should be like this

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



Re: Roleplay Chat Commands [zcmd] - Steven82 - 03.01.2012

Post this in the snippets section..