Simple help
#1

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;
}
Reply
#2

Код:
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
Reply
#3

This is probably the function you are looking for https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#4

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
Reply
#5

As you wish
Reply
#6

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)
Reply
#7

Quote:
Originally Posted by Prumpuz
Посмотреть сообщение
This is probably the function you are looking for https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
i dont know if it is this, cant get it work with it anyways, but thanks
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)