Jump to content
  • 0

Bug GM GameLife V 1.6.0


play2013

Question

GM-ul Gamelife are un bug groaznic daca ma puteti ajuta sal rezolv

La maisnile personale dupa ce dai /v buy dau RR sau Stop la server si dupa imi zice iara sai dau /v buy !

Acest bug este determinat de schimbarea ID-urilor maisnilor personale de pe sv dupa RR sau stop Server!

Am incercat sa fac ceva dra degeaba....

Daca ma ajuta careva

Deci se schimba id urile maisnilor dupa RR sau o perioada de timp.....

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

//==============================================================================

  if(IsAnOwnableCar(newcar))

{

    if(CarInfo[newcar][cOwned]==0)

    {

        TogglePlayerControllable(playerid, 0);

        format(string, sizeof(string), "* Vehicul %s de vanzare.", CarInfo[newcar][cDescription]);

        SendClientMessage(playerid, COLOR_WHITE, string);

        format(string, sizeof(string), "Pret: *$%d*.{FFFFFF}Scrie {33ff33}/v buy{ffffff} sa cumperi vehiculul acesta.", CarInfo[newcar][cValue]);

        SendClientMessage(playerid, COLOR_WHITE, string);

    }

    if(CarInfo[newcar][cOwned]==1)

    {

        if(strcmp(name,CarInfo[newcar][cOwner], true) == 0)

  {

        format(string,sizeof(string)," * Vehiculul tau, %s",CarInfo[newcar][cOwner]);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

if(PlayerInfo[playerid][pPcarkey] == vehicle) { }

else if(PlayerInfo[playerid][pPcarkey2] == vehicle) { }

else if(PlayerInfo[playerid][pPcarkey3] == vehicle) { }

}

else

{

if(IsPlayerAdmin(playerid))

{

    SendClientMessage(playerid, COLOR_GREY, " Poti conduce masina pentru ca esti logat cu RCON !");

}

                    else

    {

    SetPlayerPos(playerid,x,y,z+2);

}

format(string, sizeof(string), " * Tu nu esti proprietarul %s",CarInfo[newcar][cOwner]);

    SendClientMessage(playerid, 0xFF8000FF, string);

}

    }

}

//==============================================================================

Asta am la /v buy !!!

Link to comment
Share on other sites

/vehicle

//==========================[/v(ehicle)]========================================

if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        new x_nr[64];

        x_nr = strtok(cmdtext, idx);

        if(!strlen(x_nr))

        {

            SendClientMessage(playerid, COLOR_WHITE, "____________[Personal Vehicle Help]____________");

            SendClientMessage(playerid, COLOR_WHITE, "** {1AFF00}(/v)ehicle {09DFF7}[name]");

            SendClientMessage(playerid, COLOR_WHITE, "**buy, park, color, tow(1-3), fix(1-3), model");

            return 1;

        }

        if(strcmp(x_nr,"park",true) == 0)

        {

            new Float:x,Float:y,Float:z;

new Float:a;

new carid;

new getcarid = GetPlayerVehicleID(playerid);

if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carid = PlayerInfo[playerid][pPcarkey]; }

else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { carid = PlayerInfo[playerid][pPcarkey2]; }

else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { carid = PlayerInfo[playerid][pPcarkey3]; }

else { return 1; }

GetPlayerName(playerid, playername, sizeof(playername));

GetVehiclePos(carid, x, y, z);

GetVehicleZAngle(carid, a);

if(IsPlayerInVehicle(playerid,carid) && CarInfo[carid][cOwned] == 1)

{

  if(PlayerInfo[playerid][pPcarkey] == -1 && PlayerInfo[playerid][pPcarkey2] == -1 && PlayerInfo[playerid][pPcarkey3] == -1)

{

SendClientMessage(playerid, COLOR_GREY, "N ai o masina personala.");

return 1;

}

  if(getcarid == carid)

{

                        new Float:CarHP, Float:OldCarHP; new panels,doors,lights,tires;

CarInfo[carid][cLocationx] = x;

CarInfo[carid][cLocationy] = y;

CarInfo[carid][cLocationz] = z;

CarInfo[carid][cAngle] = a;

GetVehicleDamageStatus(carid,panels,doors,lights,tires);

GetVehicleHealth(carid, CarHP); OldCarHP = CarHP;

OnCarUpdate(); DestroyVehicle(carid);

CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);

// format(TextCar, sizeof(TextCar), "{EE1111}Owner: {0099FF}• %s •", CarInfo[carid][cOwner]);

//      Update3DTextLabelText(TextUpCar[carid], 0x33AAFFFF, TextCar);

LoadComponents(carid);

SendClientMessage(playerid, COLOR_BLUE, "* Noua pozitie a fost salvata!");

SetVehicleHealth(carid, OldCarHP);

UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);

return 1;

  }

}

        }

        else if(strcmp(x_nr,"buy",true) == 0)

        {

            if(IsAnOwnableCar(idcar))

            {

    if(PlayerInfo[playerid][pPcarkey] == -1) { }

    else if(PlayerInfo[playerid][pPcarkey2] == -1) { }

    else if(PlayerInfo[playerid][pPcarkey3] == -1) { }

    else { SendClientMessage(playerid, COLOR_GREY, "* Detii 3 masini!"); return 1; }

if(CarInfo[idcar][cOwned]==1)

{

    SendClientMessage(playerid, COLOR_GREY, "Someone already owns this car.");

    return 1;

}

if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])

{

    if(PlayerInfo[playerid][pPcarkey] == -1) { PlayerInfo[playerid][pPcarkey] = idcar; }

    else if(PlayerInfo[playerid][pPcarkey2] == -1) { PlayerInfo[playerid][pPcarkey2] = idcar; }

    else if(PlayerInfo[playerid][pPcarkey3] == -1) { PlayerInfo[playerid][pPcarkey3] = idcar; }

    else { return 1; }

CarInfo[idcar][cOwned] = 1;

GetPlayerName(playerid, sendername, sizeof(sendername));

strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);

GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);

Delete3DTextLabel(TextUpCar[idcar]);

//format(TextCar, sizeof(TextCar), "{EE1111}Owner: {0099FF}• %s •", CarInfo[idcar][cOwner]);

//TextUpCar[idcar] = Create3DTextLabel(TextCar, 0x33AAFFFF, 0.0, 0.0, 0.0, 25, 0, 1);

//Attach3DTextLabelToVehicle(TextUpCar[idcar], idcar, 0.0, 0.0, 0.1);

OnCarUpdate(); SavePlayerData(playerid);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

GameTextForPlayer(playerid, "~w~Felicitari~n~Nu uita sa o parchezi cu /v park !", 5000, 3);

        TogglePlayerControllable(playerid, 1);

return 1;

}

else

{

    SendClientMessage(playerid, COLOR_GREY, " You don't have enough cash with you!");

    return 1;

}

            }

        }

        else if(strcmp(x_nr,"color",true) == 0)

        {

            if(PlayerInfo[playerid][pPcarkey] == -1 && PlayerInfo[playerid][pPcarkey2] == -1 && PlayerInfo[playerid][pPcarkey3] == -1)

        {

            SendClientMessage(playerid, COLOR_GREY,"  You don't have a Vehicle to respray.");

            return 1;

        }

        if(GetPlayerMoney(playerid) < 1000)

        {

            SendClientMessage(playerid, COLOR_GREY,"  You don't have enough money for vehicle respray.");

            return 1;

        }

        tmp = strtok(cmdtext, idx);

        if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]");

return 1;

}

new color1;

color1 = strval(tmp);

if(color1 < 0 && color1 > 126)

{

    SendClientMessage(playerid, COLOR_GREY, " Wrong color id!");

    return 1;

}

tmp = strtok(cmdtext, idx);

        if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v color [ColorOneID] [ColorTwoID]");

return 1;

}

new color2;

color2 = strval(tmp);

if(color2 < 0 && color2 > 126)

{

    SendClientMessage(playerid, COLOR_GREY, " Wrong color id!");

    return 1;

}

if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { vehid = PlayerInfo[playerid][pPcarkey]; }

else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; }

else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { vehid = PlayerInfo[playerid][pPcarkey3]; }

else { return 1; }

        if(IsPlayerInVehicle(playerid, vehid))

        {

            new Float:CarHP, Float:OldCarHP;

new panels, doors, lights, tires;

GetVehicleDamageStatus(vehid, panels, doors, lights, tires);

GetVehicleHealth(vehid, CarHP); OldCarHP = CarHP;

        CarInfo[vehid][cColorOne] = color1;

                CarInfo[vehid][cColorTwo] = color2;

                GivePlayerMoney(playerid, -1000);

                GameTextForPlayer(playerid, "~w~Masina Personala~n~~g~Revopsita cu succes~n~~r~$-100", 5000, 1);

                ChangeVehicleColor(vehid, color1, color2);

                SetVehicleToRespawn(vehid);

SetVehicleHealth(vehid, OldCarHP);

UpdateVehicleDamageStatus(vehid, panels, doors, lights, tires);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

                OnCarUpdate();

return 1;

    }

        else

        {

            SendClientMessage(playerid, COLOR_GREY," You are not in your Personal car.");

            return 1;

        }

        }

        /*else if(strcmp(x_nr,"locate1",true) == 0)

        {

    if(!IsPlayerConnected(playerid)) { return 1; }

    new Float:x,Float:y,Float:z;

    new car = PlayerInfo[playerid][pPcarkey];

    if(PlayerInfo[playerid][pPcarkey]==-1) { GameTextForPlayer(playerid, "~w~Nu ai o masina pentru a putea fi localizata", 2500, 3); return 1; }

SendClientMessage(playerid,COLOR_WHITE,"Locatia masinii a fost gasita.");

GetVehiclePos(car, x, y, z);

    SetPlayerCheckpoint(playerid, x, y, z, 6);

    return 1;

        }

        else if(strcmp(x_nr,"locate2",true) == 0)

        {

    if(!IsPlayerConnected(playerid)) { return 1; }

    new Float:x,Float:y,Float:z;

    new car = PlayerInfo[playerid][pPcarkey2];

    if(PlayerInfo[playerid][pPcarkey2]==-1) { GameTextForPlayer(playerid, "~w~Nu ai o masina pentru a putea fi localizata", 2500, 3); return 1; }

SendClientMessage(playerid,COLOR_WHITE,"Locatia masinii a fost gasita.");

GetVehiclePos(car, x, y, z);

    SetPlayerCheckpoint(playerid, x, y, z, 6);

    return 1;

        }

        else if(strcmp(x_nr,"locate3",true) == 0)

        {

    if(!IsPlayerConnected(playerid)) { return 1; }

    new Float:x,Float:y,Float:z;

    new car = PlayerInfo[playerid][pPcarkey3];

    if(PlayerInfo[playerid][pPcarkey3]==-1) { GameTextForPlayer(playerid, "~w~Nu ai o masina pentru a putea fi localizata", 2500, 3); return 1; }

SendClientMessage(playerid,COLOR_WHITE,"Locatia masinii a fost gasita.");

GetVehiclePos(car, x, y, z);

    SetPlayerCheckpoint(playerid, x, y, z, 6);

    return 1;

        }*/

        else if(strcmp(x_nr,"tow1",true) == 0)

        {

  if(IsPlayerConnected(playerid))

{

    new Float:CarHP, Float:OldCarHP;

new panels,doors,lights,tires;

new car = PlayerInfo[playerid][pPcarkey];

GetPlayerName(playerid, playername, sizeof(playername));

if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey]][cOwner], true) == 0)

{

    GetVehicleDamageStatus(car,panels,doors,lights,tires);

GetVehicleHealth(car, CarHP); OldCarHP = CarHP;

GameTextForPlayer(playerid, "~w~Masina personala~n~~g~Tractata cu succes~n~~r~$-1.500", 5000, 1);

GivePlayerMoney(playerid,-1500);

SetVehicleToRespawn(car);

SetVehicleHealth(car, OldCarHP);

UpdateVehicleDamageStatus(car, panels, doors, lights, tires);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

}

else

{

GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1);

}

}

        }

        else if(strcmp(x_nr,"tow2",true) == 0)

        {

  if(IsPlayerConnected(playerid))

{

    new Float:CarHP, Float:OldCarHP;

new panels,doors,lights,tires;

new car = PlayerInfo[playerid][pPcarkey2];

GetPlayerName(playerid, playername, sizeof(playername));

if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey2]][cOwner], true) == 0)

{

    GetVehicleDamageStatus(car,panels,doors,lights,tires);

GetVehicleHealth(car, CarHP); OldCarHP = CarHP;

GameTextForPlayer(playerid, "~w~Masina personala~n~~g~Tractata cu succes~n~~r~$-1.500", 5000, 1);

GivePlayerMoney(playerid,-1500);

SetVehicleToRespawn(car);

SetVehicleHealth(car, OldCarHP);

UpdateVehicleDamageStatus(car, panels, doors, lights, tires);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

}

else

{

GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1);

}

}

        }

        else if(strcmp(x_nr,"tow3",true) == 0)

        {

  if(IsPlayerConnected(playerid))

{

    new Float:CarHP, Float:OldCarHP;

new panels,doors,lights,tires;

new car = PlayerInfo[playerid][pPcarkey3];

GetPlayerName(playerid, playername, sizeof(playername));

if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey3]][cOwner], true) == 0)

{

    GetVehicleDamageStatus(car,panels,doors,lights,tires);

GetVehicleHealth(car, CarHP); OldCarHP = CarHP;

GameTextForPlayer(playerid, "~w~Masina personala~n~~g~Tractata cu succes~n~~r~$-1.500", 5000, 1);

GivePlayerMoney(playerid,-1500);

SetVehicleToRespawn(car);

SetVehicleHealth(car, OldCarHP);

UpdateVehicleDamageStatus(car, panels, doors, lights, tires);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

}

else

{

GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1);

}

}

        }

        else if(strcmp(x_nr,"fix1",true) == 0)

        {

  if(IsPlayerConnected(playerid))

{

new car = PlayerInfo[playerid][pPcarkey];

GetPlayerName(playerid, playername, sizeof(playername));

if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey]][cOwner], true) == 0)

{

GameTextForPlayer(playerid, "~w~Masina personala~n~~g~Reparata cu succes~n~~r~$-2.500", 5000, 1);

GivePlayerMoney(playerid,-2500);

SetVehicleToRespawn(car);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

}

else

{

GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1);

}

}

        }

        else if(strcmp(x_nr,"fix2",true) == 0)

        {

  if(IsPlayerConnected(playerid))

{

new car = PlayerInfo[playerid][pPcarkey2];

GetPlayerName(playerid, playername, sizeof(playername));

if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey2]][cOwner], true) == 0)

{

    GameTextForPlayer(playerid, "~w~Masina personala~n~~g~Reparata cu succes~n~~r~$-2.500", 5000, 1);

GivePlayerMoney(playerid,-2500);

SetVehicleToRespawn(car);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

}

else

{

GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1);

}

}

        }

        else if(strcmp(x_nr,"fix3",true) == 0)

        {

  if(IsPlayerConnected(playerid))

{

new car = PlayerInfo[playerid][pPcarkey3];

GetPlayerName(playerid, playername, sizeof(playername));

if (car != -1 && strcmp(playername, CarInfo[PlayerInfo[playerid][pPcarkey3]][cOwner], true) == 0)

{

    GameTextForPlayer(playerid, "~w~Masina personala~n~~g~Reparata cu succes~n~~r~$-2.500", 5000, 1);

GivePlayerMoney(playerid,-2500);

SetVehicleToRespawn(car);

PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

}

else

{

GameTextForPlayer(playerid, "~w~Nu detii o masina personala.", 5000, 1);

}

}

        }

        else if(strcmp(x_nr,"model",true) == 0)

        {

            new Float:x,Float:y,Float:z;

            new carid;

            new Float:a;

            new Float:CarHP, Float:OldCarHP;

new panels,doors,lights,tires;

            carid = GetPlayerVehicleID(playerid);

            GetVehiclePos(carid, x, y, z);

            GetVehicleZAngle(carid, a);

            if(IsPlayerInVehicle(playerid,carid))

            {

                if(PlayerInfo[playerid][pDonateRank] < 3)

{

SCM(playerid, COLOR_GREY, "* Trebuie sa ai cont EXTRA VIP pentru acces la /v model!");

return 1;

}

if(GetPlayerMoney(playerid) < 5000)

        {

            SendClientMessage(playerid, COLOR_GREY,"Nu ai destui bani.");

            return 1;

        }

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

    SCM(playerid, COLOR_GREY, "USAGE: /v model [model]");

    return 1;

}

new model;

model = strval(tmp);

if(model < 400 || model > 611)

{

SCM(playerid, COLOR_GREY, "* Id-ul modelului trebuie sa fie cuprins intre 400 si 611!");

return 1;

}

else

{

//new tittle[128];

                //new carkey = PlayerInfo[playerid][pPcarkey];

                //format(tittle,128,"%s", CarInfo[carkey][cModel]);

//else

//{

CarInfo[carid][cModel] = model;

    CarInfo[carid][cLocationx] = x;

    CarInfo[carid][cLocationy] = y;

    CarInfo[carid][cLocationz] = z;

    CarInfo[carid][cAngle] = a;

    //format(string, sizeof(string), "~n~ You changed Car's Model~n~");

        GetVehicleDamageStatus(carid,panels,doors,lights,tires);

GetVehicleHealth(carid, CarHP); OldCarHP = CarHP;

OnCarUpdate(); DestroyVehicle(carid);

CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);

LoadComponents(carid);

GivePlayerMoney(playerid, -5000);

SendClientMessage(playerid, COLOR_BLUE, "* Schimbarea modelului te-a costat $5.000!");

//format(string, sizeof(string), "~n~ You changed Car's Model~n~");

SetVehicleHealth(carid, OldCarHP);

UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);

format(CarInfo[carid][cDescription], 32, "%s",vehName[model-400]);

return 1;

}

/*else

{

SCM(playerid, COLOR_GREY, "* Trebuie sa fi in masina pentru a utiliza comanda!");

return 1;

}*/

  }

  return 1;

}

        else

        {

            SendClientMessage(playerid, COLOR_WHITE, "____________[Personal Vehicle Help]____________");

            SendClientMessage(playerid, COLOR_WHITE, "** {1AFF00}(/v)ehicle {09DFF7}[name]");

            SendClientMessage(playerid, COLOR_WHITE, "**buy, park, color, tow(1-3), fix(1-3), model");

            return 1;

        }

  }

    return 1;

}

//==============================================================================

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.