Problem with ((/y OOC))
#1

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.
Reply
#2

I just wanna know how to make it like /y [X]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)