Jump to content
  • 0

Vehicule


AndreiB

Question

Salutare am intampinat o problema la serverul meu 

Cand ma inregistrez pe el si dau /v imi apar acolo 2 masini o data am avut infernus si perenial,am sters contul si am facut altul mi-a dat un comet si zr-350 

cum pot sa repar aceasta problema 

la comanda /v apare asta

if(BlockVehUse[playerid] != 0) return SS(playerid, COLOR_RED2, "Ai prea multe masini, foloseste /sellcar si vinde una.", "You have to many vehicles, use /sellcar and sell one.");

si mai apare chestia asta cand ma inregistrez 

if(count > PlayerInfo[playerid][pCarSlots])
    {
        if(PlayerInfo[playerid][pLanguage] == 2) format(string, sizeof(string), "Ai prea multe masini! Poti avea maxim %d masini (tu ai %d).", PlayerInfo[playerid][pCarSlots], count);
        else format(string, sizeof(string), "You have to many vehicles! You can have maximum %d cars (you have %d).", PlayerInfo[playerid][pCarSlots], count);
        SendClientMessage(playerid, COLOR_RED2, string);
        SS(playerid, COLOR_RED2, "Nu vei putea conduce nicio masina pana cand nu vei vinde una din masinile tale.", "You can't use a vehicle until you sell one of your cars.");
        BlockVehUse[playerid] = count;
    }
    else
    {
        BlockVehUse[playerid] = 0;
    }

este pusa la publicul loadcarid

public LoadCarID(playerid)
{
    for(new idd; idd < MAX_PERSONAL_VEHICLES; idd++)
    {
        PlayerInfo[playerid][pCarID][idd]            = 0;
        PlayerInfo[playerid][pCar][idd]                = -1;
        PlayerInfo[playerid][pCarModel][idd]         = 0;
        PlayerInfo[playerid][pCarLocX][idd]         = 0.0;
        PlayerInfo[playerid][pCarLocY][idd]         = 0.0;
        PlayerInfo[playerid][pCarLocZ][idd]         = 0.0;
        PlayerInfo[playerid][pCarAngle][idd]         = 0.0;
        PlayerInfo[playerid][pCarLLocX][idd]         = 0.0;
        PlayerInfo[playerid][pCarLLocY][idd]         = 0.0;
        PlayerInfo[playerid][pCarLLocZ][idd]         = 0.0;
        PlayerInfo[playerid][pCarAngle2][idd]         = 0.0;
        PlayerInfo[playerid][pCarBuyTime][idd]        = 0;
        PlayerInfo[playerid][pCarColor1][idd]         = 1;
        PlayerInfo[playerid][pCarColor2][idd]         = 1;
        PlayerInfo[playerid][pCarLock][idd]         = 0;
        PlayerInfo[playerid][pCarInsPrice][idd]     = 0;
        PlayerInfo[playerid][pCarIns][idd]             = 0;
        PlayerInfo[playerid][pCarKM][idd]             = 0.0;
        PlayerInfo[playerid][pCarKMLast][idd]        = 0;
        PlayerInfo[playerid][pCarVIP][idd]            = 0;
        PlayerInfo[playerid][pCarVipColor][idd]        = 0;
        PlayerInfo[playerid][pCarHP][idd]             = 0.0;
        PlayerInfo[playerid][pCarDamage1][idd]         = 0;
        PlayerInfo[playerid][pCarDamage2][idd]         = 0;
        PlayerInfo[playerid][pCarDamage3][idd]         = 0;
        PlayerInfo[playerid][pCarDamage4][idd]         = 0;
        PlayerInfo[playerid][pCarGas][idd]             = 100;
        PlayerInfo[playerid][pCarPaintJ][idd]         = 6;
        PlayerInfo[playerid][pCarBlock][idd]        = 0;
        CarVipName[playerid][idd] = "";
        CarPlate[playerid][idd] = "";
        CarOwner[playerid][idd] = "";
        for(new s; s < 17; s++)
        {
            CarMod[playerid][idd] = 0;
        }
    }
    new string[256],count;
    format(string, sizeof(string), "SELECT * FROM `cars` WHERE `Owner`='%s'", PlayerInfo[playerid][pNormalName]);
    new Cache: xd = mysql_query(SQL, string);
    for(new i, j = cache_get_row_count (); i != j; ++i)
    {
        if(count < MAX_PERSONAL_VEHICLES)
        {
            PlayerInfo[playerid][pCar][count] = cache_get_field_content_int(i, "ID");
        }
        count++;
    }
    cache_delete(xd);
    if(count > PlayerInfo[playerid][pCarSlots])
    {
        if(PlayerInfo[playerid][pLanguage] == 2) format(string, sizeof(string), "Ai prea multe masini! Poti avea maxim %d masini (tu ai %d).", PlayerInfo[playerid][pCarSlots], count);
        else format(string, sizeof(string), "You have to many vehicles! You can have maximum %d cars (you have %d).", PlayerInfo[playerid][pCarSlots], count);
        SendClientMessage(playerid, COLOR_RED2, string);
        SS(playerid, COLOR_RED2, "Nu vei putea conduce nicio masina pana cand nu vei vinde una din masinile tale.", "You can't use a vehicle until you sell one of your cars.");
        BlockVehUse[playerid] = count;
    }
    else
    {
        BlockVehUse[playerid] = 0;
    }
    LoadCar(playerid);
    return 1;
}

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
42 minutes ago, Dennis12. said:

E dus pe apa sambetei tot sistemu' de vehicule din bigzone nu prea ai ce sa-i faci.

Rescrie-l / plateste un scripter sa-l rescrie si scapi de problema asta.

man cam cat dureaza sa fie rescris? si cat costa? ca as vrea sa il faci tu

Edited by AndreiB
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
Answer this question...

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