Jump to content
  • 0

pomoc Nefunguje


Artasus

Dotaz

Popis problému:

Zdravím :d mám taky maličky problem,ide o to že keď dám /mise a som pritom vo vozidle s ID 437 tak mi to misiu nespustí a napíše "Musíš byť v Autobuse", neviete niekto náhodou riešenie? :)

 

Chyby/varování kompilátoru a při běhu:

Žiadne

 

Kód:

 

CMD:mise(playerid,params[])
{
if(GetVehicleModel(vehicleid) == 437)
{
ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Misia Vodič Autobusu","Linka číslo 1","Potvrdit","Späť");
}
else return SCM(playerid,-1,"{FF0000}[!]{FFFFFF}Musíš byť v Autobuse!");
return 1;
}

 

 

 

Dodatečné poznámky:

--

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0

Přidej tam definici proměnné "vehicleid": new vehicleid = GetPlayerVehicleID(playerid);

 

Takto by ti to mělo fungovat:

CMD:mise(playerid,params[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 437)
    {
        ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Misia Vodič Autobusu","Linka číslo 1","Potvrdit","Späť");
    }
    else return SCM(playerid,-1,"{FF0000}[!]{FFFFFF}Musíš byť v Autobuse!");
    return 1;
}
Link to comment
Share on other sites

  • 0

Riadok: if(GetVehicleModel(vehicleid) == 437) prepíš na: if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)

  • Líbí se mi to! (+1) 1
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...