Jump to content
  • 0

Ajutor SA:MP.Ro


wifi123

Question

Salut SA:MP Ro am si eu o mica problema cu un gm RPG , nu pot inchiria nimic ca zice out of stock...

Uitati linia cu , comanda /rentcar

[pawn] if(strcmp(cmd, "/rentcar", true) == 0)

{

        if(IsPlayerConnected(playerid))

{

if(GetPlayerVehicleID(playerid) >= rentcar1 && GetPlayerVehicleID(playerid) <= rentcar16)

{

new hirefee = HireCost(GetPlayerVehicleID(playerid));

            if(GetPlayerVehicleID(playerid) >= rentcar1 && GetPlayerVehicleID(playerid) <= rentcar16)

{

if(SBizzInfo[0][sbProducts] == 0)

{

GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);

return 1;

}

if(HireCar[playerid] != 299)

{

gCarLock[HireCar[playerid]] = 0;

UnLockCar(HireCar[playerid]);

SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You already rent a car,type /unrentcar to unrent previous car !");

return 1;

}

for(new i=0; i<MAX_PLAYERS; i++)

{

    if(HireCar == GetPlayerVehicleID(playerid))

    {

        SendClientMessage(playerid, COLOR_GREY, "[Eroare]: Someone rented this car !");

        return 1;

    }

}[/pawn]

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

[pawn]

if(strcmp(cmd, "/rentcar", true) == 0)

{

        if(IsPlayerConnected(playerid))

{

if(GetPlayerVehicleID(playerid) >= rentcar1 && GetPlayerVehicleID(playerid) <= rentcar16)

{

new hirefee = HireCost(GetPlayerVehicleID(playerid));

            if(GetPlayerVehicleID(playerid) >= rentcar1 && GetPlayerVehicleID(playerid) <= rentcar16)

{

if(HireCar[playerid] != 299)

{

gCarLock[HireCar[playerid]] = 0;

UnLockCar(HireCar[playerid]);

SendClientMessage(playerid, COLOR_GREY, "[Eroare]: You already rent a car,type /unrentcar to unrent previous car !");

return 1;

}

for(new i=0; i<MAX_PLAYERS; i++)

{

    if(HireCar == GetPlayerVehicleID(playerid))

    {

        SendClientMessage(playerid, COLOR_GREY, "[Eroare]: Someone rented this car !");

        return 1;

    }

}[/pawn]

Incearca

 

 

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.