diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_one.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_one.pwn index 7287b3b..238c384 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_one.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_one.pwn @@ -660,8 +660,9 @@ CMD:goto( playerid, params[ ] ) 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 ( ! IsPlayerConnected( pID ) ) return SendError(playerid, "Invalid Player ID."); - else if ( pID == playerid ) return SendError(playerid, "You cannot go to yourself."); + else if ( ! IsPlayerConnected( pID ) ) return SendError( playerid, "Invalid Player ID." ); + 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 { GetPlayerPos( pID, X, Y, Z ); diff --git a/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn b/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn index 809f0c0..54d3fa5 100644 --- a/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn +++ b/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn @@ -63,11 +63,6 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) if ( GetPlayerInterior( playerid ) || GetPlayerVirtualWorld( playerid ) ) 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 ++ ) { 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 ) return SendError( playerid, "You need $10,000 to bring your vehicle to you." ); + new + Float: X, Float: Y, Float: Z; + foreach( new i : Player ) { if( GetPlayerVehicleID( i ) == g_vehicleData[ playerid ] [ id ] [ E_VEHICLE_ID ] ) @@ -87,11 +85,13 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) } } - new - Float: nodeX, Float: nodeY, Float: nodeZ, Float: nextX, Float: nextY, - nodeid = NearestNodeFromPoint( X, Y, Z ), - nextNodeid = NearestNodeFromPoint( X, Y, Z, 9999.9, nodeid ) - ; + // get the player's position again + GetPlayerPos( playerid, X, Y, Z ); + + // 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( nodeid, nodeX, nodeY, nodeZ ); diff --git a/gamemodes/irresistible/cnr/vip.pwn b/gamemodes/irresistible/cnr/vip.pwn index eaf9bbc..ee0c38c 100644 --- a/gamemodes/irresistible/cnr/vip.pwn +++ b/gamemodes/irresistible/cnr/vip.pwn @@ -544,3 +544,20 @@ stock VIPToString( viplvl ) } 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; +} diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index e3d5b70..1ae5d97 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -7548,7 +7548,7 @@ CMD:viplist( playerid, params[ ] ) 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++; } if ( count == 0 ) return SendError( playerid, "There are no V.I.P's online." );