2021-02-20, 09:19 PM
(This post was last modified: 2021-02-20, 09:20 PM by Nicolas_Belic.)
(2021-02-20, 08:59 PM)daddy. Wrote:
Your code is all messed up, we barely know what do you want.
Try this:
Code:
[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]CMD:gl(playerid, params[])[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]{[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? static[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? Text[132],[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? string[128],[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? PlayerName[MAX_PLAYER_NAME];[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? if(!sscanf(params, "s[132]", Text)) return SendClientMessage(playerid, -1, "{D41818}[COMANDO]{AFAFAF} /gl <texto>");[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? else[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? {[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? if (Gl_Privados[playerid] == 1) return SendClientMessage(playerid, -1, "{D41818}[ERROR]{AFAFAF} you have blocked the /gl");[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); // storing player name first in the PlayerName variable[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? foreach(new i : Player)[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? {[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? ? ? if (Gl_Privados[i] == 0)[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? ? ? {[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? ? ? ? ? format(string, sizeof(string), "{D41818}[ID:%d - %s]:{AFAFAF} %s",playerid, PlayerName, Text);[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? ? ? ? ? SendClientMessage(i, 0xFFFFFF00, string);[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? ? ? }[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? ? ? }[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? }[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]? ? return 1;[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]}[/font][/size][/color]
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]
daddy, the function it's works but,?can't send custom messages?
Like this:
/gl hi, this is a test etc (reply: the command is bad use?/gl <text>)
/gl (reply:?[ID:0?- player]:{AFAFAF} (random word)