Dragging
#1

I'm still very new to the scripting thing so I need some help.
I'm working on a drag command where if but I'm at a loss, could I get a hand? Thanks in advance.

PHP код:
CMD:drag(playerid,params[])
{
    new 
idFloat:XFloat:YFloat:Z;
    if(!
PlayerInfo[playerid][pFaction] < 1) return SCM(playeridCOLOR_GREY,"You're not authorized to use this command.");
    else if(
isDragged[id] == true) return SCM(playeridCOLOR_LIGHTRED"That player is already being dragged.");
    else if(
sscanf(params,"ui"playerid)) return SCM(playeridCOLOR_GREY,"[Usage:] /drag, id.");
    if(!
IsPlayerConnected(id)) return SCM(playeridCOLOR_LIGHTRED,"That player is not connected.");
    if(
id == playerid) return SendClientMessage(playeridCOLOR_LIGHTRED"You can't drag yourself.");
    if(!
IsPlayerInRangeOfPoint(playerid5.0XYZ)) return SCM(playeridCOLOR_GREY,"That player is not near you.");
    
isDragged[id] = true;
    
isDragging[playerid] = true;
    return 
1;

Reply


Messages In This Thread
Dragging - by Cubie - 09.09.2017, 15:14
Re: Dragging - by Dusan01 - 09.09.2017, 15:22
Re: Dragging - by Cubie - 09.09.2017, 15:48
Re: Dragging - by Dusan01 - 10.09.2017, 08:30
Re: Dragging - by JasonRiggs - 10.09.2017, 08:49

Forum Jump:


Users browsing this thread: 1 Guest(s)