25.10.2010, 16:50
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:
keep in mind, using [MAX_PLAYERS] won't allow players to save it, use dini to save it into users' profile.
goodluck
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;
}
goodluck