[HELP] /ado and /ame commands
#1

how to make /ado and /ame commands on sscanf....

ex /ado and /ame :




Please help me.. i really need thats for 0.3e...
i`m sorry if this thread on wrong section..
Reply
#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
#3

Click the tutorial in my signature, it covers everything roleplay chat related
Reply
#4

EDIT : I got 8 warnings after compile it
Код:
C:\Roleplay\gamemodes \RP.pwn(28823) : warning 202: number of
arguments does not match definition C:\
Roleplay\gamemodes\RP.pwn(28823) :
warning 202: number of arguments does not match
definition C:\Roleplay\gamemodes
\RP.pwn(28834) : warning 202: number of arguments does not match definition C:\
Roleplay\gamemodes\RP.pwn(28834) :
warning 202: number of arguments does not match
definition C:\Roleplay\gamemodes
\RP.pwn(28834) : warning 202: number of
arguments does not match definition C:\Roleplay\gamemodes\RP.pwn(28834) :
warning 202: number of arguments does not match
definition Pawn compiler 3.2.3664 Copyright ©
1997-2006, ITB CompuPhase 8 Warnings.
And this is the line

Код:
ProxDetector(20.0, playerid, string,0x330066AA);
Reply
#5

is that warning take effects of the script ?? sorry for my bad english
Reply
#6

Add this on the bottom of your script as i said before.
pawn Код:
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);
        }
    }
    return 1;
}
Reply
#7

C:\Roleplay\gamemodes\RP.pwn(32802) : warning 202: number of arguments does not match definition
C:\Roleplay\gamemodes\RP.pwn(32802) : warning 202: number of arguments does not match definition
C:\Roleplay\gamemodes\RP.pwn(32802) : warning 202: number of arguments does not match definition
C:\Roleplay\gamemodes\RP.pwn(32802) : warning 202: number of arguments does not match definition
C:\Roleplay\gamemodes\RP.pwn(32812) : warning 202: number of arguments does not match definition
C:\Roleplay\gamemodes\RP.pwn(32812) : warning 202: number of arguments does not match definition
C:\Roleplay\gamemodes\RP.pwn(32812) : warning 202: number of arguments does not match definition
C:\Roleplay\gamemodes\RP.pwn(32812) : warning 202: number of arguments does not match definition
C:\Roleplay\gamemodes\RP.pwn(82796) : error 025: function heading differs from prototype
C:\Roleplayy\gamemodes\RP.pwn(82797) : error 021: symbol already defined: "ProxDetector"

I add proxdetector at the bottom but error i don't know why?
and 8 warning.
please a full explanation but i very very very need CMD /ame and /ado
Reply
#8

Download zcmd by Zeex.Click here.

Put the zcmd.inc file into your servers/pawn/include folder. Then add this just below #include<a_samp>.
pawn Код:
#include<zcmd>
And then compile your script.
Reply
#9

thanks.. its work.. but why /ado like this



i hope it like this


Reply
#10

please help me!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)