Jump to content
  • 0

Vehicle plate


Daedric-Fox

Question

Problema intalnita (descriere): As vrea sa imi spuneti si mie va rog, cum fac ca orice  masina de pe server care nu este a nimanui, orice masina create cu /veh etc sa aiba la numar ce aleg eu nu literele alea de exp: cum e pe ugged bgd...etc eu vreau downed sau altceva cum fac?
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:da am incercat cu: "SetVehicleNumberPlate" pusa la comanda /veh dar nu merge...

 

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

am adaugat doar la comanda veh SetVehicleNumberPlate dar nu merge, + daca o fac sa mearga merge doar la masinile care le spawnez eu, dar eu vreau la toate de pe server

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0

am adaugat doar la comanda veh SetVehicleNumberPlate dar nu merge, + daca o fac sa mearga merge doar la masinile care le spawnez eu, dar eu vreau la toate de pe server

Mai,arata toata comanda.

Ofer servicii de web designer/developer(contact me pentru portofoliu etc)

Metode de plata: Paysafecard,Skrill,PayPal,Bitcoin

Ofer si servicii de Penetration Testing.

Vand si VPN-uri. 5 euro pe luna

Skype: live:mrtunne.tkcode

Discord: https://mrtunne.info/discord

Link to comment
Share on other sites

  • 0
	if(strcmp(cmd, "/veh", true) == 0)
			{
			    if(IsPlayerConnected(playerid))
			    {
			        if (PlayerInfo[playerid][pAdmin] < 1338)
					{
					    SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use the command. ");
					    return 1;
					}
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
						return 1;
					}
					new car;
					car = strval(tmp);
					if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "Vehicle Number can't be below 400 or above 611 !"); return 1; }
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
						return 1;
					}
					new color1;
					color1 = strval(tmp);
					if(color1 < 0 || color1 > 172) { SendClientMessage(playerid, COLOR_GREY, "Color Number can't be below 0 or above 172 !"); return 1; }
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
						return 1;
					}
					new color2;
					color2 = strval(tmp);
					if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, "Color Number can't be below 0 or above 126 !"); return 1; }
					new Float:X,Float:Y,Float:Z;
					GetPlayerPos(playerid, X,Y,Z);
					new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
					PutPlayerInVehicle(playerid, carid, 0);
					LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
					SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
					SetVehicleNumberPlate(vehicleid, "Downed");
					format(string, sizeof(string), "Vehicle %d spawned.", carid);
					SendClientMessage(playerid, COLOR_GREY, string);
				}
				return 1;
			}

 

Edited by DaEdRiC-FoX

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0

Incearca sa pui acel setVehicleNumberPlate sub

new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);

Ofer servicii de web designer/developer(contact me pentru portofoliu etc)

Metode de plata: Paysafecard,Skrill,PayPal,Bitcoin

Ofer si servicii de Penetration Testing.

Vand si VPN-uri. 5 euro pe luna

Skype: live:mrtunne.tkcode

Discord: https://mrtunne.info/discord

Link to comment
Share on other sites

  • 0

Pentru toate masinile de pe server trebuie sa adaugi tu . Le iei id-ul de pe server prin ajutorul comenzii /dl apoi in gamemode, la OnGamemodeInit setezi cum vrei tu , exemplu :

SetVehicleNumberPlate(138, "Downed");

138 fiind id-ul masinii de pe server .

Ca sa scapi mai usor si sa nu verifici toate masinile ai mai putea in loc de id-ul de pe server sa folosesti id-urile pentru masinile factiunilor care sunt in gamemode , de exemplu PD = CreateVehicle(522, x,y,z 0,0, 60000);

Tu o sa setezi numarul pentru acea masina asa :

SetVehicleNumberPlate(PD, "Downed");

Iar la comanda /veh la linia :

SetVehicleNumberPlate(vehicleid, "Downed");

in loc de vehicleid pune carid . Pentru ca masinii care este creeata prin acea comanda i se atribuie variabila "carid" .

SetVehicleNumberPlate(carid, "Downed");

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.