drag help
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
1. Please use intendation and [.pawn] tag (without dot)
2. SendClientMessageEx is not a native function. Did you define it somewhere?
3. Try:
pawn Код:
CMD:drag(playerid, params[])
{
    if(IsACop(playerid))
    {
        new string[128], giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /drag [playerid]");

        if(IsPlayerConnected(giveplayerid))
        {
            if(GetPVarInt(giveplayerid, "PlayerCuffed") == 2)
            {
                if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, " You must be out of the vehicle to use this command.");
                if(GetPVarInt(giveplayerid, "BeingDragged") == 1) return SendClientMessage(playerid, COLOR_WHITE, " That player is already being dragged. ");
               
                new Float:dX, Float:dY, Float:dZ;
                GetPlayerPos(giveplayerid, dX, dY, dZ);
               
                if(!IsPlayerInRangeOfPoint(playerid, 5.0, dX, dY, dZ)) return SendClientMessage(playerid, COLOR_GRAD2, " That suspect is not near you.");

                format(string, sizeof(string), "* %s has is now dragging you.", GetPlayerNameEx(playerid));
                SendClientMessage(giveplayerid, COLOR_WHITE, string);
                format(string, sizeof(string), "* You are now dragging %s, you may move them now.", GetPlayerNameEx(giveplayerid));
                SendClientMessage(playerid, COLOR_WHITE, string);
                format(string, sizeof(string), "* %s grabs ahold of %s and begins to move them.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SendClientMessage(playerid, COLOR_WHITE, "You are now dragging the suspect, press the '{AA3333}FIRE{FFFFFF}' button to stop.");
                SetPVarInt(giveplayerid, "BeingDragged", 1);
                SetPVarInt(playerid, "DraggingPlayer", giveplayerid);
                return 1;
            }
            else return SendClientMessage(playerid, COLOR_WHITE, " The specified player is not cuffed !");
        } else return SendClientMessage(playerid, COLOR_WHITE, " The specified player is not connected !");
    }
    else return SendClientMessage(playerid, COLOR_GREY, " You are not a LEO ! ");
}
Not working.
Reply


Messages In This Thread
drag help - by BurgerWoman - 29.07.2012, 13:20
Re: drag help - by Misiur - 29.07.2012, 13:29
Re: drag help - by BurgerWoman - 29.07.2012, 13:51
Re: drag help - by Misiur - 29.07.2012, 13:56
Re: drag help - by BurgerWoman - 29.07.2012, 14:01
Re: drag help - by Misiur - 29.07.2012, 14:09
Re: drag help - by BurgerWoman - 29.07.2012, 14:13
Re: drag help - by Misiur - 29.07.2012, 15:25

Forum Jump:


Users browsing this thread: 4 Guest(s)