Jump to content

Problema Car


david1995

Recommended Posts

17 hours ago, Mister said:

Posteaza de la onplayerkeystatechange   cauta newkeys == KEY_NO

Uite

Cred ca de asta ai nevoie.

Quote

if (newkeys & KEY_NO)
   {
        if(SwitchKey[playerid] == 1)
        {
            new string[100];
             if(personalcar[playerid] != 0)
              {
                if(CheckPlayerDistanceToVehicle(5.0, playerid, personalcar[playerid]))
                {
                     if(CarInfo[OwnedVeh(personalcar[playerid])][cLock] == 1)
                      {
                        GetVehicleParamsEx(personalcar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
                          SetVehicleParamsEx(personalcar[playerid],engine,lights,alarm,0,bonnet,boot,objective);
                        format(string, sizeof(string), "~w~%s ~Descuiat",CarInfo[OwnedVeh(personalcar[playerid])][cDescription]);
                        GameTextForPlayer(playerid, string, 4000, 4);
                        CarInfo[OwnedVeh(personalcar[playerid])][cLock] = 0;
                        gCarLock[personalcar[playerid]] = 0;
                        vUpdate(OwnedVeh(personalcar[playerid]), cLockx); //
                        return 1;
                    }
                    else if(CarInfo[OwnedVeh(personalcar[playerid])][cLock] == 0)
                    {
                        GetVehicleParamsEx(personalcar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
                          SetVehicleParamsEx(personalcar[playerid],engine,lights,alarm,1,bonnet,boot,objective);
                        format(string, sizeof(string), "~w~%s ~r~Incuiat",CarInfo[OwnedVeh(personalcar[playerid])][cDescription]);
                        GameTextForPlayer(playerid, string, 4000, 4);
                        CarInfo[OwnedVeh(personalcar[playerid])][cLock] = 1;
                        gCarLock[personalcar[playerid]] = 1;
                        vUpdate(OwnedVeh(personalcar[playerid]), cLockx); //
                        return 1;
                    }
                }
                return 1;
             }
            else return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't have a vehicle.");
        }
        else if(SwitchKey[playerid] == 2)
        {
            new carid,string[128];
            if(HireCar[playerid] == -1) return 1;
            if(HireCar[playerid] != -1)
            {
                carid = HireCar[playerid];
            }
            if(CheckPlayerDistanceToVehicle(5.0, playerid, HireCar[playerid]))
            {
                if(gCarLock[carid] == 0)
                {
                    new vehicles = GetVehicleModel(carid) - 400;
                    format(string, sizeof(string), "~w~%s ~r~Incuiat", aVehicleNames[vehicles]);
                    GameTextForPlayer(playerid, string, 4000, 4);
                      PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                    gCarLock[carid] = 1;
                    GetVehicleParamsEx(HireCar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
                      SetVehicleParamsEx(HireCar[playerid],engine,lights,alarm,1,bonnet,boot,objective);
                    return 1;
                }
                else if(gCarLock[carid] == 1)
                {
                    new vehicles = GetVehicleModel(carid) - 400;
                    format(string, sizeof(string), "~w~%s ~g~Descuiat", aVehicleNames[vehicles]);
                    GameTextForPlayer(playerid, string, 4000, 4);
                    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
                    gCarLock[carid] = 0;
                    GetVehicleParamsEx(HireCar[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
                      SetVehicleParamsEx(HireCar[playerid],engine,lights,alarm,0,bonnet,boot,objective);
                    return 1;
                }
            }
        }
    }

 

Link to comment
Share on other sites

Incearca sa comentezi gametextul asa

//GameTextForPlayer

Compileaza si vezi daca mai da crash alt motiv de crash nu inteleg

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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