Drag command
#5

So can i do like this?

PHP код:
forward Draggingt(playeridID);
public 
Draggingt(playeridID)
{
        new 
Float:dXFloat:dYFloat:dZ;
        
GetPlayerPos(playeriddXdYdZ);
        
SetPlayerPos(IDdX+1dYdZ);
}
CMD:drag(playeridparams[])
{
        new 
IDstring[26+MAX_PLAYER_NAME], string2[20+MAX_PLAYER_NAME];
        if(
sscanf(params"u"ID)) return SendClientMessage(playeridGREY"CMD:/drag [playerid]");
        if(
pCuffed[ID] == 0) return SendClientMessage(playeridGREY"This player must first be cuffed");
        if(
Dragged[ID] == && Dragging[playerid] == 0)
        {
            
Dragged[ID] = 1;
            
Dragging[playerid] = 1;
            
format(stringsizeof(string), "You are being dragged by %s."RemoveUnderScore(playerid));
            
format(string2sizeof(string2), " You are dragging %s."RemoveUnderScore(ID));
            
SCM(playeridPURPLEstring2);
            
SCM(IDPURPLEstring);
        
draggedtimer[ID] = SetTimerEx("Draggingt"10001"dd"playerid,ID);
        }
        else
        {
            
Dragged[ID] = 0;
            
Dragging[playerid] = 0;
            
SCM(playeridPURPLE"You have stopped dragging your target.");
            
SCM(IDPURPLE"You aren't being dragged anymore.");
            
KillTimer(draggedtimer[ID]);
        }
        return 
1;

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)