help /refuel
#1

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.
Reply
#2

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);
}
Reply
#3

@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.
Reply
#4

Bump

Please how to fix this?
Reply
#5

GetPlayerCash to GetPlayerMoney
GivePlayerCrash to GivePlayerMoney
Reply
#6

@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
Reply
#7

Bump

Please help me for this.
Reply
#8

Bump

please help me
Reply
#9

doing it by script file would be easier thats how I have it on my server
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)