SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Romānă/Romanian (https://forum.sa-mp.com/forumdisplay.php?f=40)
-   -   Putin ajutor /v plate (https://forum.sa-mp.com/showthread.php?t=461358)

BoSs_S 01/09/2013 03:27 PM

Putin ajutor /v plate
 
Am si eu o problema am comanda /v plate si cand dau /v plate nu vreau sa ma mai dea jos din masina vreau sa stea playerul in ea

comanda:

pawn Code:
else if(strcmp(x_nr,"plate",true) == 0)
            {
              if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcheiemasina] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PTP(5.0,playerid,1058.1322,-916.3584,42.6642))
              {
                    new Float:x,Float:y,Float:z,Float:ang;
                    GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                    GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
                    ShowPlayerDialog(playerid,171,DIALOG_STYLE_INPUT,"{EE7777}Numarul Masinii","{00CC66}Scrie numarul masinii mai jos.","Yes","Cancel");
                    return 1;
              }
              else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcheiemasina2] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PTP(5.0,playerid,1058.1322,-916.3584,42.6642))
              {
                    new Float:x,Float:y,Float:z,Float:ang;
                    GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                    GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
                    ShowPlayerDialog(playerid,171,DIALOG_STYLE_INPUT,"{EE7777}Numarul Masinii","{00CC66}Scrie numarul masinii mai jos.","Yes","Cancel");
                    return 1;
              }

dialogul
pawn Code:
if(dialogid == 171)
    {
       if(response)
       {
                new Float:x,Float:y,Float:z,Float:ang;
                new idcar = GetPlayerVehicleID(playerid);
                SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
                GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
                SetVehicleToRespawn(GetPlayerVehicleID(playerid));
                SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                SetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
                strmid(CarInfo[idcar][cLicense], inputtext, 0, strlen(inputtext), 999);
                SaveCarCoords();
                OnCarUpdate();
       }
    }

myhaitza97 01/09/2013 03:53 PM

Re: Putin ajutor /v plate
 
PutPlayerInVehicle.
Foloseste wiki, nu cred ca e asa de greu, revin-o cand ai incercat ceva si arata ce ai facut.

BoSs_S 02/09/2013 11:36 AM

Re: Putin ajutor /v plate
 
Am Facut asa
pawn Code:
else if(strcmp(x_nr,"plate",true) == 0)
            {
              if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcheiemasina] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PTP(5.0,playerid,1312.4531,-2544.8621,15.3839))
              {
                    new Float:x,Float:y,Float:z,Float:ang;
                    new carid1;
                    GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                    GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
                    PutPlayerInVehicle(playerid, carid1, 0);
                    ShowPlayerDialog(playerid,171,DIALOG_STYLE_INPUT,"{EE7777}Masina Slot 1","{00CC66}Scrie numarul masinii mai jos.","Yes","Cancel");
                    return 1;
              }
              else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcheiemasina2] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PTP(5.0,playerid,1305.8207,-2545.5112,15.4585))
              {
                    new Float:x,Float:y,Float:z,Float:ang;
                    new carid1;
                    GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                    GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
                    PutPlayerInVehicle(playerid, carid1, 0);
                    ShowPlayerDialog(playerid,171,DIALOG_STYLE_INPUT,"{EE7777}Masina Slot 2","{00CC66}Scrie numarul masinii mai jos.","Yes","Cancel");
                    return 1;
              }

DanishHaq 02/09/2013 11:39 AM

Re: Putin ajutor /v plate
 
Felicitari............... si merge? Lol............ are trebuie sa merge.

BoSs_S 02/09/2013 12:16 PM

Re: Putin ajutor /v plate
 
Nu merge, dar nu inteleg de ce te bagi tu ca prostu

WopsS 02/09/2013 12:19 PM

Re: Putin ajutor /v plate
 
Si dupa ce ai pus alea, ce iti face, tot jos te da?

Edit:
pawn Code:
if(dialogid == 171)
    {
       if(response)
       {
                new Float:x,Float:y,Float:z,Float:ang;
                new idcar = GetPlayerVehicleID(playerid);
                SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
                GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
                SetVehicleToRespawn(GetPlayerVehicleID(playerid));
PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
                SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
                SetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
                strmid(CarInfo[idcar][cLicense], inputtext, 0, strlen(inputtext), 999);
                SaveCarCoords();
                OnCarUpdate();
       }
    }
aici era buba!


All times are GMT. The time now is 03:38 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.