View Single Post
Old 01/09/2013, 03:27 PM   #1
BoSs_S
Huge Clucker
 
BoSs_S's Avatar
 
Join Date: Mar 2011
Posts: 484
Reputation: 5
Default 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();
       }
    }
__________________
[IMG]
BoSs_S is offline