Posts: 323
Threads: 111
Joined: Jul 2011
Reputation:
0
hey i have been trying to long trying to find a script that can refuel your car when u are at the gas station
so is like a car fuel system but i want it not to do it a commands i want the when i am at fuel station i press (H)
to refuel my car?
Posts: 3,488
Threads: 16
Joined: Jun 2007
Reputation:
0
Do you have the refuel system?
Posts: 1,767
Threads: 124
Joined: Mar 2010
if(IsPlayerInRangeOfPoint(playerid, 10.0, X, Y, Z)) - X, Y, Z of your gas station.
OnPlayerKeyStateChange..
Give us more code.
Posts: 1,767
Threads: 124
Joined: Mar 2010
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & YOUR_KEY)
{
OnPlayerCommandText("/refuel");
}
return true;
}
Posts: 1,767
Threads: 124
Joined: Mar 2010
Oops..
Like that:
pawn Код:
OnPlayerCommandText(playerid, "/refuel");
Posts: 1,767
Threads: 124
Joined: Mar 2010