if(dialogid == BLINDAGEM)
{
Controle(playerid, 1);
ShowPlayerDialog(playerid,BLINDAGEM+1,DIALOG_STYLE_LIST,"Sistema de Blindagem","Blindagem Comum\nBlindagem Sуcio","Aceitar","Cancelar");
if(!response)
return true;
if(listitem == 0)
{
Blin[vehicleid] = 100;
RepairVehicle(vehicleid);
SendClientMessage(playerid, COR_RED, "Seu Veiculo Foi Blindado Por $30000");
GivePlayerMoney(playerid, -30000);
GetVehicleHealth(vehicleid, Vida);
SetTimerEx("Blin", 1000, false, "i", vehicleid);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Blindou seu Veiculo", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
else if(listitem == 1)
{
Blin[vehicleid] = 200;
RepairVehicle(vehicleid);
SendClientMessage(playerid, COR_RED, "*[SУCIO]* Seu Veiculo Foi Blindado +200+ Por $15000");
GivePlayerMoney(playerid, -15000);
GetVehicleHealth(vehicleid, Vida);
SetTimerEx("Blin", 1000, false, "i", vehicleid);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Sуcio %s Blindou seu Veiculo", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return true;
}
if(dialogid == BLINDAGEM)
{
Controle(playerid, 1);
ShowPlayerDialog(playerid,BLINDAGEM+1,DIALOG_STYLE_LIST,"Sistema de Blindagem","Blindagem Comum\nBlindagem Sуcio","Aceitar","Cancelar");
if(!response)
return true;
if(strcmp(cmd, "/blindar", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2456.7915,-1461.0281,23.7199))
{
ShowPlayerDialog(playerid,BLINDAGEM,DIALOG_STYLE_LIST,"Sistema de Blindagem","Blindagem Comum\nBlindagem Sуcio","Aceitar","Cancelar");
return true;
}
}
new Float: VehLife[MAX_VEHICLES];
new Blindagem[MAX_VEHICLES];
#define BLINDAGEM 567
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/blindar", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2456.7915,-1461.0281,23.7199)) return 1;
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Oras, cadк o veнculo?");
ShowPlayerDialog(playerid,BLINDAGEM,DIALOG_STYLE_LIST,"Sistema de Blindagem","Blindagem Comum\nBlindagem Sуcio","Aceitar","Cancelar");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == BLINDAGEM)
{
if(!response) return 1;
Controle(playerid, 1);
new vehid = GetPlayerVehicleID(playerid);
new sendername[MAX_PLAYER_NAME], string[128];
if(listitem == 0)
{
Blindagem[vehid] = 100;
RepairVehicle(vehid);
SendClientMessage(playerid, COR_RED, "Seu Veiculo Foi Blindado Por $30000");
GivePlayerMoney(playerid, -30000);
GetVehicleHealth(vehid, VehLife[vehid]);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Blindou seu Veiculo", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else if(listitem == 1)
{
Blindagem[vehid] = 200;
RepairVehicle(vehid);
SendClientMessage(playerid, COR_RED, "*[SУCIO]* Seu Veiculo Foi Blindado +200+ Por $15000");
GivePlayerMoney(playerid, -15000);
GetVehicleHealth(vehid, VehLife[vehid]);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Sуcio %s Blindou seu Veiculo", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
return 1;
}
return 1;
}
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new Float: vLife;
GetVehicleHealth(vehicleid, vLife);
if(vLife < VehLife[vehicleid])
{
if(Blindagem[vehicleid] > 0)
{
new dano = floatround(VehLife[vehicleid] - vLife);
new calc = dano*100/1000;
Blindagem[vehicleid] -= calc;
SetVehicleHealth(vehicleid, 1000);
RepairVehicle(vehicleid);
GetVehicleHealth(vehicleid, VehLife[vehicleid]);
return 1;
}
}
return 1;
}
new Float:Speedo_X,Float:Speedo_Y,Float:Speedo_Z;
new Float:Speedo_HP;
for(new i=0; i<MAX_PLAYERS; i++)
{
new vehicle = GetPlayerVehicleID(i);
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, Speedo_X, Speedo_Y, Speedo_Z);
GetPlayerVehicleID(i);
GetVehicleHealth(GetPlayerVehicleID(i), Speedo_HP);
new str1[256],str2[256],str3[256],str4[256],str5[256],str6[256],str7[256];
if(SpeedoON[i] == 0)
{
TextDrawShowForPlayer(i, box[i]);
TextDrawShowForPlayer(i, fahrzeug[i]);
TextDrawShowForPlayer(i, mph[i]);
TextDrawShowForPlayer(i, combustivelt[i]);
TextDrawShowForPlayer(i, zustand[i]);
TextDrawShowForPlayer(i, gps[i]);
TextDrawShowForPlayer(i, hoehe[i]);
TextDrawShowForPlayer(i, url[i]);
SpeedoON[i] = 1;
}
format(str1,sizeof(str1),"~w~~d~Veiculo: ~b~~h~~h~%s",vehName[GetVehicleModel(vehicle)-400]);
TextDrawSetString(fahrzeug[i], str1);
format(str2,sizeof(str2),"~w~~d~KM/H: ~y~%d",GetPlayerSpeed(i, true));
TextDrawSetString(mph[i], str2);
format(str3,sizeof(str3),"~w~~d~Combustivel: ~g~~h~%d%%", Gas[vehicle]);
TextDrawSetString(combustivelt[i], str3);
format(str4,sizeof(str4),"~w~~d~Lataria: ~r~~h~%0.0f%%", Speedo_HP/10);
TextDrawSetString(zustand[i], str4);
format(str5,sizeof(str5),"~w~~d~GPS: ~p~~h~%s", ReturnPlayerZone(i));
TextDrawSetString(gps[i], str5);
format(str6,sizeof(str6),"~w~~d~Blindagem: ~r~~h~%d%%", Blin[vehicle]);
TextDrawSetString(hoehe[i], str6);
format(str7,sizeof(str7),URLALIEN);
TextDrawSetString(url[i], str7);
}
SavePlayerPos[i][sX] = Speedo_X, SavePlayerPos[i][sY] = Speedo_Y, SavePlayerPos[i][sZ] = Speedo_Z;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerInAnyVehicle(i))
{
TextDrawHideForPlayer(i, box[i]);
TextDrawHideForPlayer(i, fahrzeug[i]);
TextDrawHideForPlayer(i, mph[i]);
TextDrawHideForPlayer(i, combustivelt[i]);
TextDrawHideForPlayer(i, zustand[i]);
TextDrawHideForPlayer(i, gps[i]);
TextDrawHideForPlayer(i, hoehe[i]);
TextDrawHideForPlayer(i, url[i]);
SpeedoON[i] = 0;
}
if(spawnado[i] == 1)
{
if(SpeedoON[i] >= 1)
{
TextDrawHideForPlayer(i, forum[i]);
}
if(SpeedoON[i] <= 0)
{
TextDrawShowForPlayer(i, forum[i]);
}
}
}
}
new TempoAutoReparar;
TempoAutoReparar = SetTimerEx("AutoReparar", 200, true, "i", playerid);
KillTimer( TempoAutoReparar );
forward AutoReparar(playerid);
public AutoReparar(playerid)
{
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}
PHP код:
PHP код:
PHP код:
PHP код:
|