[HELP] /ado and /ame commands
#2

Try this for /ame and /ado
pawn Код:
//Add this anywhere in the gm but not in a function.
// Credits to VincentDunn for this small ProxDetector recommended for /me's and /do's.
stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    foreach(Player,i)
    {
        if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
        {
            SendClientMessage(i,color,string);
        }
    }
}

COMMAND:ame(playerid, params[])
    {
        new string[128],msg[128],pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pname,sizeof(pname));
        if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /ame <text>");
        format(string,sizeof(string),"[AME] %s %s",pname,msg);
        ProxDetector(20.0, playerid, string,0x330066AA);
        SetPlayerChatBubble(playerid, string, 0x330066AA, 100.0, 10000);
        return 1;
    }
COMMAND:ado(playerid, params[])
    {
        new string[128],msg[128],pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pname,sizeof(pname));
        if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /ado <text>");
        format(string,sizeof(string),"[ADO] %s ((%s))",msg,pname);
        ProxDetector(20.0, playerid, string,0x330066AA);
        SetPlayerChatBubble(playerid, string, 0x330066AA, 100.0, 10000);
        return 1;
    }
Reply


Messages In This Thread
[HELP] /ado and /ame commands - by Dannylarz - 09.05.2012, 03:30
Re: [HELP] /ado and /ame commands - by Ballu Miaa - 09.05.2012, 04:02
Re: [HELP] /ado and /ame commands - by ReneG - 09.05.2012, 04:13
Re: [HELP] /ado and /ame commands - by Dannylarz - 09.05.2012, 04:40
Re: [HELP] /ado and /ame commands - by Dannylarz - 09.05.2012, 08:14
Re: [HELP] /ado and /ame commands - by Ballu Miaa - 09.05.2012, 12:52
Re: [HELP] /ado and /ame commands - by Dannylarz - 10.05.2012, 09:32
Re: [HELP] /ado and /ame commands - by Ballu Miaa - 10.05.2012, 10:41
Re: [HELP] /ado and /ame commands - by Dannylarz - 10.05.2012, 11:26
Re: [HELP] /ado and /ame commands - by Dannylarz - 12.05.2012, 15:37

Forum Jump:


Users browsing this thread: 1 Guest(s)