/o ranks - 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: /o ranks (
/showthread.php?tid=426783)
/o ranks -
Joshswag - 30.03.2013
This is my code for the /o
Код:
CMD:o(playerid, params[])
{
new say[256];
if(togo[playerid] == 0) return SendClientMessage(playerid, COLOR_CYAN, "You have not enabled OOC chat. Type /togooc if you wish to toggle it.");
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /o [text]");
if(sscanf(params, "s[256]", say))
{
SendClientMessage(playerid, -1, "USAGE: /o [text]");
}
new str[256];
format(str, 256, "(( %s says: %s ))", GetName(playerid), say);
SCMTO(str);
return 1;
}
I'm trying to change it so that the rank shows before the name. I tried adding things like this under the script..
Код:
if(PlayerInfo[playerid][pAdmin] == 6)
{
format(str, 256, "Server Director %s: %s", GetName(playerid), say);
return 1;
}
And I didn't get any errors, although when I went ingame, nothing appeared to change. I would be very appreciative if somebody could fix my script, using the above sort of text, so that all the administrator ranks from 1-6 and helper ranks from 1-2 (which just changes from pAdmin to pHelper) show up before the players name.
Regards,
Re: /o ranks -
Chrillzen - 30.03.2013
You were sure you were level 6 and not level 5 or 7 or whatever? That code only allows level 6 to have Server Director: infront of his name. :P
Re: /o ranks -
Joshswag - 30.03.2013
The code was bigger in the script, I had from 1 - 6 with all of the assigned ranks.
Re: /o ranks -
Joshswag - 30.03.2013
bump