How to use this on one type of vehicle
#1

How can I transform this instead of just one Ambulance, It does it for every one spawned ever?


Код:
new ambulance;
ambulance = AddStaticVehicle(cords...)
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{   
      if(newstate == PLAYER_STATE_DRIVER)    
         {        
            new veh = GetPlayerVehicleID(playerid);        
            new pskin=GetPlayerSkin(playerid);        
            if(pskin != 275 || pskin != 276 && veh == ambulance)           
               {                
           RemovePlayerFromVehicle(playerid);                
        SendClientMessage(playerid, 0x00FF00AA, "This vehicle is only for Medics!");                
     return 1;            
   }        
return 1;   
 }
Reply
#2

Add more variables and continue coding.
Reply
#3

Thats what I dont want to do.. I was told I could do it once, And it would do it for every ambulance
Reply
#4

pawn Код:
public IsAnAmbulance(car)
{
  new model = GetVehicleModel(car);
  if(model == 416 || model == 407 || model == 544) return true;
  return false;
}
Reply
#5

@pete
Thanks alot, But where do I input this into the script for it to function properly? Its late, But Ive put it everywhere.. I cant get it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)