15.09.2013, 16:18
Can someone help me with these errors please ?
And here is the whole Drag/stopdrag command
Код:
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;
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;
}