Jump to content
  • 0

Vehicle Numer Name


Deejaybwg

Question

Am comanda /vother pe server, cu care pot opri/porni motorul vehiculului, aprind/sting farurile, schimb numarul de inamtriculare al vehiculului, etc..

Cand setez numarul de inmatriculare, dau enter, se schimba numarul, si dupa 2-3 secunde imi dispare vehiculul.

Cum pot rezolva problema asta ?

Si pe langa schimbarea nr. de inmatriculare de la /vother, mai am si o comanda pentru asta:

[pawn] if (strcmp("/vname", cmdtext, true, 10) == 0) {

new Float:x,Float:y,Float:z,Float:ang;

GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);

GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);

    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"You're not in a vehicle!");

    ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"{EE7777}Vehicle Numberplate","{00CC66}Input your new vehicle numberplate below.","Yes","Cancel");

return 1; }[/pawn]

www.youtube.com/thebwgg

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Guest farse

pune codul dedesubt la if(dialogid == 0) aici...

NumberPlate se schimba dupa ce masina se respawneaza,deci trebuie s'o faci sa se respawneze si sa te puna in ea..

Link to comment
Share on other sites

Codul asta ?

[pawn]if(dialogid == 0) {

if(response) {

new Float:x,Float:y,Float:z,Float:ang;

SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);

GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);

GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);

SetVehicleToRespawn(GetPlayerVehicleID(playerid));

SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);

PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);

SetVehicleZAngle(GetPlayerVehicleID(playerid),ang);

} else {

SendClientMessage(playerid,0xFFFFFFFF,"You cancelled!"); } }[/pawn]

www.youtube.com/thebwgg

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.