30.12.2012, 09:05
I need help to find a link there can show me how i can make so players need 500 score to drive this vehicle...
for(new i = 0; i < sizeof(Cardefine); i ++){
if(vId == Cardefine[i]){
if(GetPlayerScore(playerid) < 500){
RemovePlayerFromVehicle(playerid); }
}
}
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( newstate == PLAYER_STATE_DRIVER && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 520 )
// If he is driver and the model who drives is hydra(modelid: 520) then...
{
if( GetPlayerScore( playerid ) < 500 ) RemovePlayerFromVehicle( playerid );
// If his score is less than 500, remove him from the vehicle.
}
return 1;
}