Problem with ((/y OOC)) - 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: Problem with ((/y OOC)) (
/showthread.php?tid=409329)
Problem with ((/y OOC)) -
Saw® - 21.01.2013
Hey everyone , I wanted to create a command like (/y [OOC]) it is not the (/O) but only for players to speak with others oocly.
pawn Код:
dcmd_y(playerid, params[])
{
if(Mute[playerid] == 1) return SendClientMessage(playerid,COLOR_CERVENA,"Vous кtes mutй.");
if(IsLogged[playerid] == true)
{
new pos;
new string[150];
if(!params[0]||!(pos=chrfind(' ',params))||!params[pos]) return SendClientMessage(playerid, COLOR_GREY, "Usage: /y [Texte OOC]");
format(string, sizeof(string), "%s [%d]:((%s))", PlayerName(playerid),playerid,params[pos]);
ProxDetector(playerid, 20.0, string, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE);
}
return 1;
}
The problem is In Game when I do like (/y hi player) it sends only : Name: ((player)) , I think the problem is here:
pawn Код:
if(!params[0]||!(pos=chrfind(' ',params))||!params[pos]) return SendClientMessage(playerid, COLOR_GREY, "Usage: /y [Texte OOC]");
I took this frim my ban command so it works with /command [x] [y]
thank you.
Re: Problem with ((/y OOC)) -
Saw® - 21.01.2013
I just wanna know how to make it like /y [X]