Please Help With This Unique System - 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: Please Help With This Unique System (
/showthread.php?tid=185653)
Please Help With This Unique System -
<Weponz> - 25.10.2010
Please help ive posted a thread on this and had no good answers i need a very basic system that saves fuel(not in car on foot).You can get fuel for /stealfuel in correct checkpoints,I need it to be able to view your fuel balance and trade/buy with fuel
Please im very lost with this may someone direct me to a similar script(Not a Fuel System There for cars)Or show me how to make the codes..
Thanks in advanced
Re: Please Help With This Unique System -
pater - 25.10.2010
You could use
attachobjecttoplayer, to attach a oildrum on the back of the player,
on the /stealfuel cmd, you could easily add "IsPlayerInRangeOfPoint"
A littly idea could be this one:
pawn Код:
new PlayerFuelStealingStatus[MAX_PLAYERS], PlayerStoleFuel[MAX_PLAYERS];
dcmd_stealfuel(playerid,params[])
{
if(PlayerStoleFuel[playerid] == 1) return SendClientMessage(playerid, COLOR, "You already stole some fuel!");
if(!IsPlayerInRangeOfPoint(playerid, 4, 0, 0, 0)) return SendClientMessage(playerid, COLOR, "You are not even close to the fuel stealing point!");
PlayerFuelStealingStatus[playerid]++;
// or
new oldfuel;
oldfuel = PlayerFuelStealingStatus[playerid];
PlayerFuelStealingStatus[playerid] = oldfuel+30;
PlayerStoleFuel[playerid] = 1;
// perhaps a timer to re-enable players to steal fuel again..
#pragma unused params
return 1;
}
keep in mind, using [MAX_PLAYERS] won't allow players to save it, use dini to save it into users' profile.
goodluck