24.03.2014, 01:05
(
Последний раз редактировалось Aerotactics; 24.03.2014 в 07:33.
)
I have this vehicle damage check and is a player not in a vehicle check and it only seems to work for one playerid at a time. As in, other players' cars blow up and they don't get a client message. It was originally under a foreach loop and wasn't working either.
pawn Код:
public DerbySys(playerid) //
{
if (IsPlayerInRangeOfPoint(playerid, 500, -1364,1004.5,1220)) //map coords...
{
if (!IsPlayerInAnyVehicle(playerid))
{
GetDerbyCar(playerid);
return 1;
}
if (IsPlayerInVehicle(playerid,RandDerbyCar[playerid]))
{
new Float:Vhealth;
GetVehicleHealth(RandDerbyCar[playerid],Vhealth);
if (Vhealth <= 250)
{
DestroyVehicle(RandDerbyCar[playerid]);
SendClientMessage(playerid,0xFFFFFFFF,"Vehicle was destroyed. New vehicle created.");
return 1;
}
}
}
return 1;
}