Jump to content
  • 0

pomoc Podmínka s návěsem ID


Honza_585

Dotaz

Zdravím, potřeboval bych poradit s jednou podmínkou..

Jedná se o to, abych vjel např na CP, nebo tak.. A musím mít zaháknutý pouze návěs s ID 584.. Zkoušel jsem to takhle, ale nejde:

Je to nejspíše začátečnická chyba, ale budu rád za pomoc.. Díky.



if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 515)
{
        if(IsTrailerAttachedToVehicle(GetPlayerVehicleID) == GetVehicleTrailer(584))
       {
                     musis mit naves ID 584
        }
}

potom jsem zkoušel:

 

if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 515)
{
         if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
        {
                  new trailer;
                  trailer = GetVehicleTrailer(GetPlayerVehicleID(playerid));
                 if(trailer == 584)
                {
                               musis mit zahaknute id 584
                }
          }
}


Děkuji všem za  případnou pomoc.

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 1

Nějaké chyby to hází ?
hádám, že ta podmínka by spíš měla být 
 

if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 515)
{
        if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 584)
       {
                     //TADY TO PROŠLO ŽE MÁ SPRÁVNÉ AUTO I NÁVĚS
        }
}

 

Edited by jenkings
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...