[ASK]how to make command /me?
#1

i will make command /me, this is script
Код:
[566]dcmd_me(const playerid, message[])
[567]{
[568]    if (!strlen(message)) {
[569]        SendClientMessage(playerid,COLOR_RED,"USAGE : /me [Gerakan Tubuh]");
[570]    }
[571]    else {
[572]        new pname[ MAX_PLAYER_NAME ];
[573]        GetPlayerName( playerid, pname, sizeof( pname ));
[574]        format( pname, sizeof(pname), "* %s %s", pname, message );
[575]	       ProxDetector(30.0, playerid, pname, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
[576]        return 1;
[577]		}
[578]    return 1;
[579]}
but show some error like this:
Quote:

C:\Program Files\Rockstar Games\Mode GTA\Project\gamemodes\grandlarc.pwn(575) : error 004: function "ProxDetector" is not implemented
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

how to fix this problem? can some one help me?
Reply
#2

Add this

pawn Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);

public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(i)) { return 1; }
                GetPlayerPos(i, posx, posy, posz);
                tempposx = (oldposx -posx);
                tempposy = (oldposy -posy);
                tempposz = (oldposz -posz);
                if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                {
                    SendClientMessage(i, col1, string);
                }
                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                {
                    SendClientMessage(i, col2, string);
                }
                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                {
                    SendClientMessage(i, col3, string);
                }
                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                {
                    SendClientMessage(i, col4, string);
                }
                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                {
                    SendClientMessage(i, col5, string);
                }
            }
            else
            {
                SendClientMessage(i, col1, string);
            }
        }
    }
    return 1;
}
Reply
#3

You took this from godfather or Ravens or so, didnt you?
And you did not copy the ProxDetector function. Search for it in the script or forum and add it to your script.
Reply
#4

Thank's for voldemort i can fix this error with your help..

@Mauzen
yes.. i am take this command from NLRP..
I've been looking for ProxDetector function in Script NLRP.. but I did not find it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)