SA-MP Forums Archive
Need help to add commands to a server - 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: Need help to add commands to a server (/showthread.php?tid=502370)



Need help to add commands to a server - KarlCassidy - 23.03.2014

Hello.

How do I add the following to my server? (What folders and such do I put them into)

I already have them implemented in my server, but I need to redo it to change their colour and such.

Код:
CMD:me(playerid, params[])
{
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /me [action]");
new string[128];
format(string, sizeof(string), "{FF8000}* {C2A2DA}%s %s", GetPlayerNameEx(playerid), params);
ProxDetectorWrap(playerid, string, 92, 30.0, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
return 1;
}
Код:
CMD:b(playerid, params[])
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /b [local ooc chat]");
new string[128];
format(string, sizeof(string), "%s: (( %s ))", GetPlayerNameEx(playerid), params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
return 1;
}
Код:
format(string, sizeof(string), "[N] {5CE6E6}%s{5CE6E6}", GetPlayersName(playerid));



Re: Need help to add commands to a server - stundje - 23.03.2014

Put them in your gamemode, define them and if needed include them. That would be it.


Re: Need help to add commands to a server - MP2 - 23.03.2014

Please learn to indent.


Re: Need help to add commands to a server - KarlCassidy - 23.03.2014

Sorry what?


Re: Need help to add commands to a server - Goldenfox - 23.03.2014

Quote:
Originally Posted by MP2
Посмотреть сообщение
Please learn to indent.
Ah come on, he's just asking for help.

So, Karl:

I see you're using ZCMD, so it doesn't really matter where you place it, just make sure it isn't under another function.

In the format of /me you see this: "{FF8000}*". Go to this website to find more heximal colour codes: http://www.free-webmaster-tools.com/colorpicker.htm

If you want to add more colours, such as COLOUR_PURPLE, go to this page https://sampwiki.blast.hk/wiki/ColorID (be sure to use the bottom image, 0.3X)


Re: Need help to add commands to a server - MP2 - 23.03.2014

Quote:
Originally Posted by Goldenfox
Посмотреть сообщение
Ah come on, he's just asking for help
So? Indentation is one of the most important things you need to know.


Re: Need help to add commands to a server - KarlCassidy - 24.03.2014

Thanks lad