Jump to content

Question

Posted

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

9 answers to this question

Recommended Posts

Guest farse
Posted

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..

Posted

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

Posted

Scuze pentru 2x post !!! Dar topic-ul era pe pagina a3-a, si nimeni nu se uita la pagina a3-a ca sa ma ajute.

Asa ca... voi primi +warn pentru ca merit...

www.youtube.com/thebwgg

Posted

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..

FarSe mi-a zis sa postez codul si l-am postat !

www.youtube.com/thebwgg

Posted

Pai codul ala il aveam deja :|

Vreau cand dau /vname sau /vother, cand imi pun un numar la masina, sa nu imi dispara masina dupa 2 secunde !

www.youtube.com/thebwgg

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.