[Code request] /me command
#6

Quote:
Originally Posted by Cxnnor
Посмотреть сообщение
#includes:
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
Color:
pawn Код:
#define COLOR_PURPLE    0xC2A2DAAA
Stocks:
pawn Код:
stock strreplace(string[], find, replace)
{
    for(new i=0; string[i]; i++)
    {
        if(string[i] == find)
        {
            string[i] = replace;
        }
    }
}

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:
pawn Код:
CMD:me(playerid, params[])
{
    new
        string[128],
        action[100];
    if(sscanf(params, "s[100]", action))
    {
        SendClientMessage(playerid, -1, "USAGE: /me [action]");
        return 1;
    }
    else
    {
        format(string, sizeof(string), "* %s %s.",(playerid), action);
        ProxDetector(30, playerid, string, COLOR_PURPLE);
    }
    return 1;
}
I got this error
Код:
fatal error 100: cannot read from file: "sscanf2"
Reply


Messages In This Thread
[Code request] /me command - by Songason - 18.07.2012, 16:00
Re: [Code request] /me command - by Gangster-rocks - 18.07.2012, 16:04
Re: [Code request] /me command - by God'Z War - 18.07.2012, 16:05
Re: [Code request] /me command - by Dan. - 18.07.2012, 16:06
Re: [Code request] /me command - by Cxnnor - 18.07.2012, 16:17
Re: [Code request] /me command - by Songason - 18.07.2012, 16:32
Re: [Code request] /me command - by Captain_Mani - 18.07.2012, 16:42
Re: [Code request] /me command - by Songason - 18.07.2012, 16:51
Re: [Code request] /me command - by mamorunl - 18.07.2012, 16:54
Re: [Code request] /me command - by Songason - 18.07.2012, 17:04

Forum Jump:


Users browsing this thread: 1 Guest(s)