27.05.2012, 22:15
(
Последний раз редактировалось Gutierrez_zikaloko; 28.05.2012 в 18:03.
)
Ajudem
#include <a_samp>
// Coordenadas do local para fazer a Blindagem
#define X 1
#define Y 1
#define Z 1
new Blindado[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" FS by CidadeNovaRP ¬¬");
print("--------------------------------------\n");
return 1;
}
public OnVehicleDamageStatusUpdate(vehicleid,playerid)
{
if(vehicleid == Blindado[playerid])
{
SetVehicleHealth(vehicleid, 2000.0);
RepairVehicle(vehicleid);
return 1;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/blindar", cmdtext, true, 10) == 0)
{
if(!PlayerToPoint(2.0 ,playerid, 2488.5581,-1460.1916,24.0181))
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк deve estar em um Veнculo para blinda-lу!");
SendClientMessage(playerid, -1, "Vocк blindou seu veiculo!");
Blindado[playerid] = GetPlayerVehicleID(playerid);
return 1;
}
return 0;
}
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return true;
}
}
return 0;
}