Rent a Bike Help [REP ++] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Rent a Bike Help [REP ++] (
/showthread.php?tid=394833)
Rent a Bike Help [REP ++] -
teomakedonija - 24.11.2012
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 !
Re: Rent a Bike Help [REP ++] -
Laure - 24.11.2012
can we see /exit command please?
Respuesta: Rent a Bike Help [REP ++] -
Parka - 24.11.2012
PHP код:
forward RentBikeTimer(playerid);
public RentBikeTimer(playerid)
{
GivePlayerMoney(playerid, -50)
rentbiketimer = SetTimer("RentBikeTimer",60000,0);///modified
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Plativte 50 dolari za rent za tocak/motor");
Pederche[playerid] = 1;
}
should work well
Re: Rent a Bike Help [REP ++] -
teomakedonija - 24.11.2012
imperor i dont have a /exit that script is with dialog
Respuesta: Rent a Bike Help [REP ++] -
Parka - 24.11.2012
well test friend.
PHP код:
forward RentBikeTimer(playerid);
public RentBikeTimer(playerid)
{
GivePlayerMoney(playerid, -50)
rentbiketimer = SetTimer("RentBikeTimer",60000,0);///modified
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Plativte 50 dolari za rent za tocak/motor");
Pederche[playerid] = 1;
}