Rent a Bike Help [REP ++]
#1

Hi i want to fix my script.When i press on Rent its ok taking -50$ its ok and now when i exit from vehicle again this taking money please fix it

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
//------------------------------------------------------------------------------
if(IsARentBike(vehicleid))
{
if(Pederche[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Poveke ne rentate Motor/Tocak");
Pederche[playerid] == 0;
KillTimer(rentbiketimer);
}
}
pawn Код:
if(dialogid == 42)
        {
        if(response)
        {
        SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Rentate Motor/Tocak");
        Pederche[playerid] = 1;
        rentbiketimer = SetTimer("RentBikeTimer",60000,0);
        }
        else
        {
        SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Izlez od Motor/Tocak");
        Pederche[playerid] = 0;
        return 1;
        }
        }
pawn Код:
forward RentBikeTimer(playerid);
public RentBikeTimer(playerid)
{
GivePlayerMoney(playerid, -50)
SetTimer("RentBikeTimer",60000,0);
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Plativte 50 dolari za rent za tocak/motor");
Pederche[playerid] = 1;
}
pawn Код:
if(IsARentBike(newcar))
        {
            if (HireCar[playerid] != newcar)
            {
                format(string, sizeof(string), "{00C0FF}Motorot e za rentanje.\nDa rentate koristi {FFFFFF}/rentmotor.\n{00C0FF}Da izlezes od motorot koristi {FFFFFF}/exit.\n{00C0FF}Cena: {FFFFFF}50$");
                ShowPlayerDialog(playerid, 42, DIALOG_STYLE_MSGBOX,"{F81414}Motor Rent",string,"Rent","Izlez");

            }
        }
HELP !
Reply
#2

can we see /exit command please?
Reply
#3

PHP код:
forward RentBikeTimer(playerid);
public 
RentBikeTimer(playerid)
{
GivePlayerMoney(playerid, -50)
rentbiketimer SetTimer("RentBikeTimer",60000,0);///modified
SendClientMessage(playeridCOLOR_WHITE"{37F906}INFO:{FFFFFF}Plativte 50 dolari za rent za tocak/motor");
Pederche[playerid] = 1;

should work well
Reply
#4

imperor i dont have a /exit that script is with dialog
Reply
#5

well test friend.
PHP код:
forward RentBikeTimer(playerid); 
public 
RentBikeTimer(playerid

GivePlayerMoney(playerid, -50
rentbiketimer SetTimer("RentBikeTimer",60000,0);///modified 
SendClientMessage(playeridCOLOR_WHITE"{37F906}INFO:{FFFFFF}Plativte 50 dolari za rent za tocak/motor"); 
Pederche[playerid] = 1

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)