If the player does not have enough scoure Prevent him from ride Hydra , tank or ....
#7

Quote:
Originally Posted by karemmahmed22
Посмотреть сообщение
Under includes:-
You can edit values (scores).
ex: #define PLAYER_LEVEL1 50 instead of #define PLAYER_LEVEL1 10
PHP код:
#define PLAYER_LEVEL1 10 
#define PLAYER_LEVEL2 20
#define PLAYER_LEVEL3 50
#define PLAYER_LEVEL4 70
#define PLAYER_LEVEL5 100 
OnPlayerStateChange:-
PHP код:
    if(newstate == PLAYER_STATE_DRIVER)
    {
    
        new 
pIscore;
        new 
vehicleid;
        
vehicleid GetPlayerVehicleID(playerid);
        
pIscore GetPlayerScore(playerid);
        if (
GetVehicleModel(vehicleid) == 476 && pIscore PLAYER_LEVEL1//  Rustler
        
{
            
SendClientMessage(playerid,-1,"Your level is not high enough to drive this vehicle, please kill others to gain score!");
            
RemovePlayerFromVehicle(playerid);
        }
        
        else if(
GetVehicleModel(vehicleid) == 447 && pIscore PLAYER_LEVEL2//Seasparrow
        
{
            
            
SendClientMessage(playerid,-1,"Your level is not high enough to drive this vehicle, please kill others to gain score!");
            
RemovePlayerFromVehicle(playerid);
        }
        
        else if(
GetVehicleModel(vehicleid) == 593 && pIscore PLAYER_LEVEL3//Dodo
            
        
{
            
            
RemovePlayerFromVehicle(playerid);
            
SendClientMessage(playerid,-1,"Your level is not high enough to drive this vehicle, please kill others to gain score!");
        }
        
        else if(
GetVehicleModel(vehicleid) == 425 && pIscore PLAYER_LEVEL4//Hunter
            
        
{
            
RemovePlayerFromVehicle(playerid);
            
SendClientMessage(playerid,-1,"Your level is not high enough to drive this vehicle, please kill others to gain score!");
        }
        
        else if(
GetVehicleModel(vehicleid) == 520 && pIscore PLAYER_LEVEL5//Hydra
            
        
{
            
RemovePlayerFromVehicle(playerid);
            
SendClientMessage(playerid,-1,"Your level is not high enough to drive this vehicle, please kill others to gain score!");
        }
    
    
    } 
Edit your vehicle ids and scores.
I should add that this is exactly where?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)