SA-MP Forums Archive
Need help with a ((Local OOC: )) Chat - 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 with a ((Local OOC: )) Chat (/showthread.php?tid=291607)



Need help with a ((Local OOC: )) Chat - Santox14 - 20.10.2011

Hey i want to create a chat like you type /l TEXT , ((Local OOC: Santox14 : Test)) , how can i make it? i searched for it but cant find a tutorial for it , can someone help me ? , im using zcmd,sscanf


Re: Need help with a ((Local OOC: )) Chat - AeroBlast - 20.10.2011

pawn Код:
CMD:l(playerid,params[])
{
    new n[24],string[128];
    GetPlayerName(playerid,n,24);
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerInRangeOfPoint(i,10,x,y,z))
        {
            format(string,128,"(( %s: %s ))",n,params);
        SendClientMessage(i,0xFFFFFFFF,string);
        return 1;
        }
    }
    return 1;
}



Re: Need help with a ((Local OOC: )) Chat - seanny - 20.10.2011

pawn Код:
CMD:b(playerid,params[])
{
    if(PlayerInfo[playerid][pMuted] == 1)
    {
        SCM(playerid, COLOR_RED,"You can't speak you have been silenced");
        return 1;
    }
    if(isnull(params)) return SCM(playerid, COLOR_GREY,"/b [local ooc chat]");
    new sendername[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid,sendername,sizeof(sendername));
    sendername[strfind(sendername,"_")] = ' ';
    format(string, sizeof(string), "%s Says: (( %s ))", sendername, params);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    return 1;
}



AW: Need help with a ((Local OOC: )) Chat - Santox14 - 20.10.2011

thank you


Re: Need help with a ((Local OOC: )) Chat - DiegoRider - 26.10.2012

no command /l , auto say EX : Push T and say direct in Local Chat !
So ...


Re: Need help with a ((Local OOC: )) Chat - copman87 - 31.12.2012

here this is what you do


question - copman87 - 31.12.2012

how do you put it so the code show up right away?


Re: Need help with a ((Local OOC: )) Chat - Scott Zulkifli - 31.12.2012

pawn Код:
public OnPlayerText(playerid, text[])
{
    format(string, sizeof(string), "%s : %s", sendername, text);
    ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
    return 0;
}
or

pawn Код:
public SendAllFormattedText(playerid, const str[], define)
{
    new tmpbuf[256];
    format(tmpbuf, sizeof(tmpbuf), str, define);
    SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}