[Ajuda] Ajuda Ai Com A blindagen - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda Ai Com A blindagen (
/showthread.php?tid=392720)
Ajuda Ai Com A blindagen -
rogerioexper - 15.11.2012
Eu queria um comando q reparaзe a blindagen mais nao sei por onde comeзar alguem ajuda ai PF
PHP код:
forward BlindarTempo(playerid);
public BlindarTempo(playerid)
{
if(GetPlayerGP(playerid) < 3500)
{
SendClientMessage(playerid, -1, " Vocк nгo tem essa grana!!");
return 1;
}
GivePlayerGP (playerid, -3500 ) ;
if (IsPlayerInAnyVehicle(playerid))
{
if(Blindado[playerid] == true)
{
Blindado[playerid] = false;
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid, VERDEFRACO, "Veiculo sem Blindagem !");
return true;
}
Blindado[playerid] = true;
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),5000);
SendClientMessage(playerid, 0xFFFF00AA, "Veiculo Blindado !");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
TogglePlayerControllable(playerid,1);
}
return true;
}
Respuesta: Ajuda Ai Com A blindagen -
Parka - 15.11.2012
PHP код:
enum Dcar
{
GodCar
}
new DataCar[MAX_PLAYERS][Dcar];
forward GodUpdate();
public GodUpdate()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && DataCar[i][GodCar] == 1 && IsPlayerInAnyVehicle(i))
{
SetVehicleHealth(GetPlayerVehicleID(i),10000);
}
}
}
teste este