Jump to content
  • 0

Neon sistem


Cordyandrey

Question

Salutare, incerc sa pun restrictii la sistemul de neon, adica sa nu poata sa bage neon si pe barca, bicicleta, motor etc eu am incercat sa fac doar ca nu prea stiu cu ce sa inlocuiesc GetClosestVehicle2 da.. stiu ca inseamna sa-i dea cel mai aropiat vehicul, ma poate ajuta cnv cu asta?

 


case DIALOG_BUYNEON: {
            if(!response) return 1;
            new vehicleid = GetPlayerVehicleID(playerid);
            new carid = FindSpawnID(vehicleid);
            new vidd = GetClosestVehicle2(playerid);
            if(IsABike2(vidd) || IsABike(vidd) || IsAPlane(vidd) || IsAPlane2(vidd) || IsABoat(vidd) || IsABoat2(vidd)) return SCM(playerid,-1, "Nu poti pune neon pe acest vehicul!");
            if(carid == 0) return SCM(playerid, COLOR_CLIENT, "A aparut o EROARE! Incearca mai tarziu...");
            if(CarInfo[carid][cNeon] != 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai deja un neon cumparat. Pentru a-l schimba, foloseste /changeneon.");            
            switch(listitem) {
                case 0: {
                    neon[0][vehicleid] = CreateDynamicObject(18648,0,0,0,0,0,0);
                    neon[1][vehicleid] = CreateDynamicObject(18648,0,0,0,0,0,0);
                }
                case 1: {
                    neon[0][vehicleid] = CreateDynamicObject(18649,0,0,0,0,0,0);
                    neon[1][vehicleid] = CreateDynamicObject(18649,0,0,0,0,0,0);
                }
                case 2: {
                    neon[0][vehicleid] = CreateDynamicObject(18650,0,0,0,0,0,0);
                    neon[1][vehicleid] = CreateDynamicObject(18650,0,0,0,0,0,0);
                }

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 1

salut

if(IsABike2(vidd) || IsABike(vidd) || IsAPlane(vidd) || IsAPlane2(vidd) || IsABoat(vidd) || IsABoat2(vidd)) 

 

inloc de vidd vei pune GetVehicleModel(vehicleid)

daca tot nu merge pui doar vehicleid simplu si daca tot nu merge postezi aici public IsABike2 si toate cele din acel if

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.