Jump to content
  • 0

pomoc [HELP]IsPlayerInVehicle....


MiNiX

Dotaz

Ahoj :d. Chci poradit.. Dělám si takovou tuničku a chci aby do ní mohly vjet jen auta co určím. Bude tam muset být podmínka if(IsPlayerInVehicle(playerid, 511)return SendClientMessage(playerid, -------, "Toto vozidlo nelze tuningovat");.. Ale v pawnu nemužu psát takhle třeba 100 podmínek vedle sebe. Nevíte jak to jinak udělat ?. Napadlo mně třeba nějak ty modely vozidel který tam nesměj dát do jedný promenný a podmínku pak napsat takhle if(IsPlayerInVehicle(playerid, PROMĚNNÁ)return SCM(-----) Ale to nevim jak.

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0
stock AUTAAA(vehicleid)
{
    new hodnota;
    new model = GetVehicleModel(vehicleid);
    switch(model){case id1,id2,atd: hodnota = model;default: hodnota = 0;}
    return hodnota;
}

a pak jenom

if(IsPlayerInVehicle(klient,AUTAAA(vehicleid)))
{


// sem v tom správném vozidle....
}
Link to comment
Share on other sites

  • 0

new NoTuningCar[]=
{
506,
407,
406  //atd
};

new bool:IsTununigCar;

IsTununigCar=true;
for(new i=0;i<sizeof(NoTuningCar);i++)
{
if(IsPlayerInVehicle(playerid,NoTuningCar[i])) IsTununigCar=false;
}
if(IsTununigCar){


//pokud je správné auto
}else SendClientMessage(playerid,-1,"Tohle auto nelze upravit");
Edited by play
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...