fix /reconnectchuff
This commit is contained in:
parent
5231ca0ac0
commit
06fd6b742b
@ -528,7 +528,15 @@ CMD:reconnectchuff( playerid, params[ ] )
|
|||||||
if ( p_AdminLevel[ playerid ] < 5 )
|
if ( p_AdminLevel[ playerid ] < 5 )
|
||||||
return SendError( playerid, ADMIN_COMMAND_REJECT );
|
return SendError( playerid, ADMIN_COMMAND_REJECT );
|
||||||
|
|
||||||
|
new
|
||||||
|
chuffsecid = GetSecurityDriverPlayer( );
|
||||||
|
|
||||||
|
if ( chuffsecid != INVALID_PLAYER_ID ) {
|
||||||
|
Kick( chuffsecid );
|
||||||
|
} else {
|
||||||
ConnectNPC( SECURE_TRUCK_DRIVER_NAME, "secureguard" );
|
ConnectNPC( SECURE_TRUCK_DRIVER_NAME, "secureguard" );
|
||||||
|
}
|
||||||
|
|
||||||
AddAdminLogLineFormatted( "%s(%d) has attempted to reconnect %s", ReturnPlayerName( playerid ), playerid, SECURE_TRUCK_DRIVER_NAME );
|
AddAdminLogLineFormatted( "%s(%d) has attempted to reconnect %s", ReturnPlayerName( playerid ), playerid, SECURE_TRUCK_DRIVER_NAME );
|
||||||
SendServerMessage( playerid, "You are now attempting to reconnect %s.", SECURE_TRUCK_DRIVER_NAME );
|
SendServerMessage( playerid, "You are now attempting to reconnect %s.", SECURE_TRUCK_DRIVER_NAME );
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -279,10 +279,14 @@ stock allSecurityOffsetsShot( ) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
stock IsSecurityDriverAFK( ) { // Damn thing bugged with range of point
|
stock IsSecurityDriverAFK( ) { // Damn thing bugged with range of point
|
||||||
new
|
new
|
||||||
Float: Z;
|
Float: Z;
|
||||||
|
|
||||||
return ( GetPlayerPos( g_secureTruckDriver, Z, Z, Z ) && Z > 1000.0 );
|
return ( GetPlayerPos( g_secureTruckDriver, Z, Z, Z ) && Z > 1000.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stock GetSecurityDriverPlayer( )
|
||||||
|
{
|
||||||
|
return IsPlayerConnected( g_secureTruckDriver ) && IsPlayerNPC( g_secureTruckDriver ) ? g_secureTruckDriver : INVALID_PLAYER_ID;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user