Jump to content
  • 0

Car Spawn dupa Nume sau ID


Striker - OG-TIMES Member

Question

5 answers to this question

Recommended Posts

  • 0

Ma refeream adica, daca scriu comanda in joc de exemplu ( /car + ID-ul vehiculului) sa imi spawneze acel vehicul.

Dar ceea ce vreau eu e ca sa pot introduce in comanda id-ul vehiculului.

Si pentru (/car + (NUMELE VEHICULULUI)) sa pot introduce numele acelui vehicul de exemplu: /car infernus , dupa care sa imi spawneze un infernus sau : /car bullet si sa imi spawneze bullet-ul.

Link to comment
Share on other sites

  • 0

Am rezolvat treaba cu /car + ID, dar acuma cum rezolv treaba cu /car + NUMELE_MASINII, vreau sa fac comanda asta care, in prim plan sa scaneze dupa numele masinii si daca este gasita sa o spawneze, si mai am o intrebare pentru a face o functie de scanare prima data trebuie sa am numele masinilor definite cu id-ul acestora ?

Link to comment
Share on other sites

  • 0

 

YCMD:dd(playerid,params[],help) {
	new car[32];
   	if(sscanf(params, "s[32]",car)) return SCM(playerid, COLOR_GREY, "Sintaxa: {FFFFFF}/dd <car name>");
    for(new v; v < sizeof(NumeVehicul); v++)
    {
        if(strcmp(NumeVehicul[v],car,true) == 0)
        {
        	new Float:x,Float:y,Float:z;GetPlayerPos(playerid, x, y, z);
			CreateVehicle(v+400, x, y, z, 0, 5, 5, -1, 0);
        }
    }
	return 1;
}
               
                                       
acel stock numevehicul posibil ca in gm tau sa fie aVehicleNames
                                       

 

aqpUjAc.png

 

 

 

 

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.