help /refuel - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help /refuel (
/showthread.php?tid=178240)
help /refuel -
gondes - 21.09.2010
I have a problem with refuel when filling the gas money we are not reduced
stock StopRefueling(playerid)
{
GivePlayerMoney(playerid, -Vehicle[GetPlayerVehicleID(playerid)][OldFuel]);
SendFormattedMessage(playerid, COLOR_YELLOW,".:: [FUEL]: Your vehicle has been refueled for $%d.", Vehicle[GetPlayerVehicleID(playerid)][OldFuel]);
Speed[playerid][Refueling] = 0; KillTimer(Speed[playerid][ReFuelTimer]);
return true;
}
How to fix this?
Sorry my english bad.
Re: help /refuel -
Camacorn - 21.09.2010
Code:
stock StopRefueling(playerid)
{
GivePlayerMoney(playerid, -Vehicle[GetPlayerVehicleID(playerid)][OldFuel]);
SendFormattedMessage(playerid, COLOR_YELLOW,".:: [FUEL]: Your vehicle has been refueled for $%d.", Vehicle[GetPlayerVehicleID(playerid)][OldFuel]);
Speed[playerid][Refueling] = 0; KillTimer(Speed[playerid][ReFuelTimer]);
if(GetPlayerCash(playerid) >= 100)
{
GivePlayerCash(playerid,-100);
}
else return SendClientMessage(playerid, COLOR_YELLOW, ".:: [FUEL]: Sorry, you do not have enough cash to refuel your vehicle!");
}
return true;
}
Try this, i havnt tested it, but it should work. PS: if you want to change the ammount of cash required, edit the "100"s to the ammount you want:
Code:
if(GetPlayerCash(playerid) >= -100)
{
GivePlayerCash(playerid,-100);
}
Re: help /refuel -
gondes - 22.09.2010
@camacorn i have error:
C:\Documents and Settings\p\Desktop\indo\filterscripts\FSpeed.pwn(7 59) : error 017: undefined symbol "GetPlayerCash"
C:\Documents and Settings\p\Desktop\indo\filterscripts\FSpeed.pwn(7 60) : error 017: undefined symbol "GivePlayerCash"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: help /refuel -
gondes - 22.09.2010
Bump
Please how to fix this?
Re: help /refuel -
Gh0sT_ - 22.09.2010
GetPlayerCash to GetPlayerMoney
GivePlayerCrash to GivePlayerMoney
Re: help /refuel -
gondes - 22.09.2010
@Ghost uhh this fix but My money is not reduced when the fill.
Look my picture that my money not reduced when the fill in gas station
How to fix this?
Sorry my english bad
Re: help /refuel -
gondes - 23.09.2010
Bump
Please help me for this.
Re: help /refuel -
gondes - 25.09.2010
Bump
please help me
Re: help /refuel -
gtapolicemods - 25.09.2010
doing it by script file would be easier thats how I have it on my server