Drag Error
#1

Can someone help me with these errors please ?
Код:
C:\Users\Win 7\Downloads\Compressed\LSRP.pwn(46459) : error 017: undefined symbol "BeingDraggedBy"
C:\Users\Win 7\Downloads\Compressed\LSRP.pwn(46484) : error 017: undefined symbol "BeingDraggedBy"
C:\Users\Win 7\Downloads\Compressed\LSRP.pwn(46490) : error 017: undefined symbol "BeingDraggedBy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
pawn Код:
(46459) : PlayerInfo[id][BeingDraggedBy] = playerid;
(46484) : if(IsPlayerConnected( i ) && PlayerInfo[i][BeingDraggedBy] == playerid)
(46490) : PlayerInfo[i][BeingDraggedBy] = -1;
And here is the whole Drag/stopdrag command
pawn Код:
CMD:drag(playerid, params[])
{
    new id, string[ 128 ];
    if( sscanf( params, "u", id) )
    {
        SendClientMessage( playerid, COLOR_WHITE, "USAGE: /drag [PlayerID/PartOfName]" );
    }
    else
    {
        if( PlayerTied[id] >= 1 || PlayerCuffed[id] >= 1)
        {
            if(GetDistanceBetweenPlayers( playerid, id) < 7)
            {
                ApplyAnimation(id,"SWEET","Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0,1);
                ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0,1);
                PlayerInfo[id][BeingDraggedBy] = playerid;
                format( string, sizeof( string ), "You have started to drag %s.", PlayerName(id) );
                SendClientMessage( playerid, COLOR_LIGHTBLUE, string);
                format( string, sizeof( string ), "* %s grabs ahold of %s and starts dragging them.", PlayerName(playerid), PlayerName(id) );
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            }
            else
            {
                SendClientMessage( playerid, COLOR_GRAD1, "You're too far away!" );
            }
        }
        else
        {
            SendClientMessage( playerid, COLOR_GRAD1, "Your target has to be either tied or cuffed." );
        }
    }
    return 1;
}
/////////////////////////////////////////////////////////////////////////////////////
CMD:stopdrag(playerid, params[])
{
    #pragma unused params
    new string[73];
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if(IsPlayerConnected( i ) && PlayerInfo[i][BeingDraggedBy] == playerid)
        {
            format( string, sizeof( string ), "You have stopped dragging %s.", PlayerName(playerid) );
            SendClientMessage( playerid, COLOR_LIGHTBLUE, string);
            format(string, sizeof(string), "* %s has stopped dragging %s.", PlayerName(playerid), PlayerName(i) );
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            PlayerInfo[i][BeingDraggedBy] = -1;
            ClearAnimations(playerid);
        }
    }
    return 1;
}
Reply
#2

You didn't declared BeingDraggedBy in enum of PlayerInfos.
Reply
#3

Under enum pInfo add BeingDraggedBy,
Reply
#4

Can you make it and post it for me please ? i dont know how to make it.

EDIT: NVM i found it ,anw thanks for help guys
Reply
#5

i have another question ,can anyone make the /drag command for LEO`s only ? so the Civillians cant use /drag
Reply
#6

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)