24.11.2012, 07:37
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
HELP !
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");
}
}