SA-MP Forums Archive
Score Vehicles help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Score Vehicles help (/showthread.php?tid=403412)



Score Vehicles help - Lynet - 30.12.2012

I need help to find a link there can show me how i can make so players need 500 score to drive this vehicle...


Re: Score Vehicles help - mau.tito - 30.12.2012

pawn Код:
for(new i = 0; i < sizeof(Cardefine); i ++){
        if(vId == Cardefine[i]){
            if(GetPlayerScore(playerid) < 500){
                RemovePlayerFromVehicle(playerid); }
        }
    }



Re: Score Vehicles help - Lynet - 30.12.2012

What is cardefine? And where can i add hydra to 500


Re: Score Vehicles help - Konstantinos - 30.12.2012

pawn Код:
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;
}



Re: Score Vehicles help - Lynet - 30.12.2012

Thanks