16.03.2019, 20:46
pawn Code:
if(strcmp(tmp,"neon",true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid,COLOR_LIGHTRED,"USE:{C5C3C1} Você precisa estar fora do veiculo.");
for(new i = 0; i < MAX_VEHICLES; i ++)
{
if (!IsPlayerNearHood(playerid, i)) return SendClientMessage(playerid,COLOR_LIGHTRED, "{FF4F4F}ERRO:{FFFFFF} Você não está próximo a nenhum capo!");
//INSTALAR NEON
}
}
stock IsPlayerNearHood(playerid, vehicleid)
{
static
Float:fX,
Float:fY,
Float:fZ;
GetVehicleHood(vehicleid, fX, fY, fZ);
return (GetPlayerVirtualWorld(playerid) == GetVehicleVirtualWorld(vehicleid)) && IsPlayerInRangeOfPoint(playerid, 3.0, fX, fY, fZ);
}