21.02.2012, 16:08
Does anyone know how to make a Script for the TAXI cars if you are not a TAXI driver you can not drive the TAXI car.I need help with this please im beginer.
public OnPlayerStateChange( playerid, newstate, oldstate )
{
if( oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER ) // if entering a vehicle as driver continue..
{
switch( GetPlayerSkin( playerid ) ) // Get the Skin
{
case 7, 142: // Skin 7 and 142 are Taxi Drivers || If skin is 7 or 142 he is taxi driver
{
SendClientMessage( playerid, -1, "Welcome Taxi Driver!" ); // He is
return 1;
}
default: // else
{
SendClientMessage( playerid, -1, "You are Taxi Driver!" ); // He is not
RemovePlayerFromVehicle( playerid ); // Remove him from the vehicle
return 1;
}
}
}
return 1;
}