* fixes /v bring bug
* adds different colors in /viplist * adds /goto detection for players that are spectating
This commit is contained in:
parent
ecf8c06fa2
commit
69545b23b2
@ -660,8 +660,9 @@ CMD:goto( playerid, params[ ] )
|
|||||||
|
|
||||||
if ( p_AdminLevel[ playerid ] < 1 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
if ( p_AdminLevel[ playerid ] < 1 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
||||||
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/goto [PLAYER_ID]" );
|
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/goto [PLAYER_ID]" );
|
||||||
else if ( ! IsPlayerConnected( pID ) ) return SendError(playerid, "Invalid Player ID.");
|
else if ( ! IsPlayerConnected( pID ) ) return SendError( playerid, "Invalid Player ID." );
|
||||||
else if ( pID == playerid ) return SendError(playerid, "You cannot go to yourself.");
|
else if ( pID == playerid ) return SendError( playerid, "You cannot go to yourself." );
|
||||||
|
else if ( p_Spectating{ pID } ) return SendError( playerid, "You cannot go to this player right now." );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetPlayerPos( pID, X, Y, Z );
|
GetPlayerPos( pID, X, Y, Z );
|
||||||
|
@ -63,11 +63,6 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
if ( GetPlayerInterior( playerid ) || GetPlayerVirtualWorld( playerid ) )
|
if ( GetPlayerInterior( playerid ) || GetPlayerVirtualWorld( playerid ) )
|
||||||
return SendError( playerid, "You cannot use this feature inside of an interior." );
|
return SendError( playerid, "You cannot use this feature inside of an interior." );
|
||||||
|
|
||||||
new
|
|
||||||
Float: X, Float: Y, Float: Z;
|
|
||||||
|
|
||||||
GetPlayerPos( playerid, X, Y, Z );
|
|
||||||
|
|
||||||
for( new id, x = 0; id < MAX_BUYABLE_VEHICLES; id ++ )
|
for( new id, x = 0; id < MAX_BUYABLE_VEHICLES; id ++ )
|
||||||
{
|
{
|
||||||
if ( g_vehicleData[ playerid ] [ id ] [ E_CREATED ] == true && g_vehicleData[ playerid ] [ id ] [ E_OWNER_ID ] == p_AccountID[ playerid ] && IsValidVehicle( g_vehicleData[ playerid ] [ id ] [ E_VEHICLE_ID ] ) )
|
if ( g_vehicleData[ playerid ] [ id ] [ E_CREATED ] == true && g_vehicleData[ playerid ] [ id ] [ E_OWNER_ID ] == p_AccountID[ playerid ] && IsValidVehicle( g_vehicleData[ playerid ] [ id ] [ E_VEHICLE_ID ] ) )
|
||||||
@ -77,6 +72,9 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
if ( GetPlayerCash( playerid ) < 10000 )
|
if ( GetPlayerCash( playerid ) < 10000 )
|
||||||
return SendError( playerid, "You need $10,000 to bring your vehicle to you." );
|
return SendError( playerid, "You need $10,000 to bring your vehicle to you." );
|
||||||
|
|
||||||
|
new
|
||||||
|
Float: X, Float: Y, Float: Z;
|
||||||
|
|
||||||
foreach( new i : Player )
|
foreach( new i : Player )
|
||||||
{
|
{
|
||||||
if( GetPlayerVehicleID( i ) == g_vehicleData[ playerid ] [ id ] [ E_VEHICLE_ID ] )
|
if( GetPlayerVehicleID( i ) == g_vehicleData[ playerid ] [ id ] [ E_VEHICLE_ID ] )
|
||||||
@ -87,11 +85,13 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new
|
// get the player's position again
|
||||||
Float: nodeX, Float: nodeY, Float: nodeZ, Float: nextX, Float: nextY,
|
GetPlayerPos( playerid, X, Y, Z );
|
||||||
nodeid = NearestNodeFromPoint( X, Y, Z ),
|
|
||||||
nextNodeid = NearestNodeFromPoint( X, Y, Z, 9999.9, nodeid )
|
// get nearest node
|
||||||
;
|
new Float: nodeX, Float: nodeY, Float: nodeZ, Float: nextX, Float: nextY;
|
||||||
|
new nodeid = NearestNodeFromPoint( X, Y, Z );
|
||||||
|
new nextNodeid = NearestNodeFromPoint( X, Y, Z, 9999.9, nodeid );
|
||||||
|
|
||||||
GetNodePos( nextNodeid, nextX, nextY, nodeZ );
|
GetNodePos( nextNodeid, nextX, nextY, nodeZ );
|
||||||
GetNodePos( nodeid, nodeX, nodeY, nodeZ );
|
GetNodePos( nodeid, nodeX, nodeY, nodeZ );
|
||||||
|
@ -544,3 +544,20 @@ stock VIPToString( viplvl )
|
|||||||
}
|
}
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stock VIPToColor( viplvl )
|
||||||
|
{
|
||||||
|
static
|
||||||
|
string[ 16 ];
|
||||||
|
|
||||||
|
switch( viplvl )
|
||||||
|
{
|
||||||
|
case VIP_DIAMOND: string = COL_DIAMOND;
|
||||||
|
case VIP_PLATINUM: string = COL_PLATINUM;
|
||||||
|
case VIP_GOLD: string = COL_GOLD;
|
||||||
|
case VIP_BRONZE: string = COL_BRONZE;
|
||||||
|
case VIP_REGULAR: string = COL_GREY;
|
||||||
|
default: string = COL_WHITE;
|
||||||
|
}
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
@ -7548,7 +7548,7 @@ CMD:viplist( playerid, params[ ] )
|
|||||||
|
|
||||||
foreach(new i : Player) if ( p_VIPLevel[ i ] > 0 )
|
foreach(new i : Player) if ( p_VIPLevel[ i ] > 0 )
|
||||||
{
|
{
|
||||||
format( szLargeString, sizeof( szLargeString ), "%s%s(%d)\t%s%s\n", szLargeString, ReturnPlayerName( i ), i, p_VIPLevel[ i ] >= 5 ? ( COL_DIAMOND ) : ( COL_GOLD ), VIPToString( p_VIPLevel[ i ] ) );
|
format( szLargeString, sizeof( szLargeString ), "%s%s(%d)\t%s%s\n", szLargeString, ReturnPlayerName( i ), i, VIPToColor( p_VIPLevel[ i ] ), VIPToString( p_VIPLevel[ i ] ) );
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
if ( count == 0 ) return SendError( playerid, "There are no V.I.P's online." );
|
if ( count == 0 ) return SendError( playerid, "There are no V.I.P's online." );
|
||||||
|
Loading…
Reference in New Issue
Block a user