Please Help With This Unique System
#2

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
Reply


Messages In This Thread
Please Help With This Unique System - by <Weponz> - 25.10.2010, 16:35
Re: Please Help With This Unique System - by pater - 25.10.2010, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)