Simple help - 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: Simple help (
/showthread.php?tid=247156)
Simple help -
cruising - 08.04.2011
Hello!
I have made a simple cmd to only use at special coords.
But i dont know how to define if a player is at the positions
i put this before the coords, i know its wrong, but just so you get my point.
pawn Код:
if IsPlayerAtPos(playerid,
And i hope i made the coords the right way to?
Code
pawn Код:
CMD:repair(playerid, params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
if IsPlayerAtPos(playerid, 405.1276,2453.0115,16.5000 || 1619.4607,1337.4252,10.8095 || 1874.7584,-2288.3972,14.2586 || -1363.8220,-488.4260,14.8779);
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(vehicleid, 1000.0);
SendClientMessage(playerid, COLOR_GREEN, "The vehicle has been repaired.");
return 1;
}
Re: Simple help -
[DJ]Boki - 08.04.2011
Код:
CMD:repair(playerid, params[])
SetVehicleHealth(vehicleid, 1000.0);
You should put this on 300.0,because your text when car repairs will spam,so put it on 300.0
Re: Simple help -
Prumpuz - 08.04.2011
This is probably the function you are looking for
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Re: Simple help -
cruising - 08.04.2011
Quote:
Originally Posted by [DJ]Boki
Код:
CMD:repair(playerid, params[])
SetVehicleHealth(vehicleid, 1000.0);
You should put this on 300.0,because your text when car repairs will spam,so put it on 300.0
|
Why should i want to set the car health to 300 when full healt is 1000? and it did not spam nothing when i repaired
Re: Simple help -
[DJ]Boki - 08.04.2011
As you wish
AW: Re: Simple help -
xerox8521 - 08.04.2011
Quote:
Originally Posted by cruising
Why should i want to set the car health to 300 when full healt is 1000? and it did not spam nothing when i repaired 
|
yup..but you even dont need to put the health back to 1000 cuz the Repair already does it ( Health damage and Visual Damage are repaired)
Re: Simple help -
cruising - 08.04.2011
Quote:
Originally Posted by Prumpuz
|
i dont know if it is this, cant get it work with it anyways, but thanks
Re: AW: Re: Simple help -
cruising - 08.04.2011
Quote:
Originally Posted by xerox8521
yup..but you even dont need to put the health back to 1000 cuz the Repair already does it ( Health damage and Visual Damage are repaired)
|
Ok! i thought it just fixed the visual damage and not the engine, thats why i put both in