Skip VIP level checking for non-VIP user

This commit is contained in:
Pichai Lertwachirakul 2019-10-01 14:09:30 +07:00 committed by GitHub
parent 142d75a759
commit 307247f6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -818,10 +818,12 @@ public OnPlayerSpawn( playerid )
SetPlayerColorToTeam( playerid ); SetPlayerColorToTeam( playerid );
SetPlayerVirtualWorld( playerid, 0 ); SetPlayerVirtualWorld( playerid, 0 );
if ( p_VIPLevel[ playerid ] >= VIP_REGULAR && p_VIPWep1{ playerid } != 0 ) GivePlayerWeapon( playerid, p_VIPWep1{ playerid }, 200 ); if ( p_VIPLevel[ playerid ] >= VIP_REGULAR ){
if ( p_VIPLevel[ playerid ] >= VIP_GOLD && p_VIPWep2{ playerid } != 0 ) GivePlayerWeapon( playerid, p_VIPWep2{ playerid }, 200 ); if ( p_VIPLevel[ playerid ] >= VIP_REGULAR && p_VIPWep1{ playerid } != 0 ) GivePlayerWeapon( playerid, p_VIPWep1{ playerid }, 200 );
if ( p_VIPLevel[ playerid ] >= VIP_PLATINUM && p_VIPWep3{ playerid } != 0 ) GivePlayerWeapon( playerid, p_VIPWep3{ playerid }, 200 ); if ( p_VIPLevel[ playerid ] >= VIP_GOLD && p_VIPWep2{ playerid } != 0 ) GivePlayerWeapon( playerid, p_VIPWep2{ playerid }, 200 );
if ( p_VIPLevel[ playerid ] >= VIP_GOLD ) SetPlayerArmour( playerid, 100.0 ); // Free armour on spawn. if ( p_VIPLevel[ playerid ] >= VIP_PLATINUM && p_VIPWep3{ playerid } != 0 ) GivePlayerWeapon( playerid, p_VIPWep3{ playerid }, 200 );
if ( p_VIPLevel[ playerid ] >= VIP_GOLD ) SetPlayerArmour( playerid, 100.0 ); // Free armour on spawn.
}
CallLocalFunction( "SetPlayerRandomSpawn", "d", playerid ); CallLocalFunction( "SetPlayerRandomSpawn", "d", playerid );