Posts: 223
Threads: 45
Joined: Feb 2016
Reputation:
0
I am looking to make a Repairing system for vehicles
so
Here is an example
CMD:repair[player,params]]
{
Isplayerinrangeofpoint(x,y,z)
{
else
isplaerinrange.....
is that correct cuz i want to make this command usable in only fuel stations
Thnx
Posts: 138
Threads: 34
Joined: Jan 2015
Reputation:
0
IfIsPlayerInVehicle you must use
Posts: 455
Threads: 29
Joined: Apr 2014
PHP код:
new Float:fuelstat[10][3]={{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0} etc};
CMD:repair(pid){
if(!IsPlayerInAnyVehicle(pid))return scm(pid,-1,"You're not in any vehicle!");
for(new i, i2=sizeof(fuelstat); i < i2; i2++){
if(!IsPlayerInRangeOfPoint(pid,10.0,fuelstat[i2][0],fuelstat[i2][1],fuelstat[i2][2]))continue;
RepairVehicle(GetPlayerVehicleID(pid));
return scm(pid,-1,"Vehicle successfully repaired.");
}
scm(pid,-1,"You're not in any fuel station!");
return 1;
}
Posts: 223
Threads: 45
Joined: Feb 2016
Reputation:
0
isplayerinanyvehicle means he can do /repair when he is in a vehicle
i mean it should be usable when he is near a pickup or checkpoint or any cord
Posts: 455
Threads: 29
Joined: Apr 2014
I just made working system try it, you have to enter fuel station cordinates. ez