Drag command
#1

So i can't drag in my server.
When i type drag it says that i am draging but actualy im not.

CMD
PHP код:
CMD:drag(playeridparams[])
{
    if(
IsACop(playerid))
    {
        new 
string[128], giveplayerid;
        if(
sscanf(params"u"giveplayerid)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /drag [playerid]");
        if(
IsPlayerConnected(giveplayerid))
        {
            if(
GetPVarInt(giveplayerid"PlayerCuffed") == 2)
            {
                if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playeridCOLOR_WHITE" You must be out of the vehicle to use this command.");
                if(
GetPVarInt(giveplayerid"BeingDragged") == 1)
                {
                    
SendClientMessageEx(playeridCOLOR_WHITE" That player is already being dragged. ");
                    return 
1;
                }
                new 
Float:dXFloat:dYFloat:dZ;
                
GetPlayerPos(giveplayeriddXdYdZ);
                if(!
IsPlayerInRangeOfPoint(playerid5.0dXdYdZ))
                {
                    
SendClientMessageEx(playeridCOLOR_GRAD2" That suspect is not near you.");
                    return 
1;
                }
                
format(stringsizeof(string), "* %s has is now dragging you."GetPlayerNameEx(playerid));
                
SendClientMessageEx(giveplayeridCOLOR_WHITEstring);
                
format(stringsizeof(string), "* You are now dragging %s, you may move them now."GetPlayerNameEx(giveplayerid));
                
SendClientMessageEx(playeridCOLOR_WHITEstring);
                
format(stringsizeof(string), "* %s grabs ahold of %s and begins to move them."GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                
SendClientMessageEx(playeridCOLOR_WHITE"You are now dragging the suspect, press the '{AA3333}FIRE{FFFFFF}' button to stop.");
                
SetPVarInt(giveplayerid"BeingDragged"playerid);
                
SetPVarInt(playerid"DraggingPlayer"1);
            }
            else
            {
                
SendClientMessageEx(playeridCOLOR_WHITE" The specified player is not cuffed !");
            }
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GREY"   You are not a LEO ! ");
        return 
1;
    }
    return 
0;

Reply


Messages In This Thread
Drag command - by FaZeRs - 02.02.2014, 00:21
Re: Drag command - by CuervO - 02.02.2014, 00:26
Re: Drag command - by FaZeRs - 02.02.2014, 00:28
Re: Drag command - by CuervO - 02.02.2014, 00:36
Re: Drag command - by FaZeRs - 02.02.2014, 01:26
Re: Drag command - by CuervO - 02.02.2014, 01:55
Re: Drag command - by FaZeRs - 02.02.2014, 02:08
Re: Drag command - by CuervO - 02.02.2014, 02:10
Re: Drag command - by FaZeRs - 02.02.2014, 02:14
Re: Drag command - by CuervO - 02.02.2014, 02:23

Forum Jump:


Users browsing this thread: 1 Guest(s)