Szerző Téma: Mi a gond ezzel a progressbar scriptel?  (Megtekintve 378 alkalommal)

dexi

  • Vendég
Mi a gond ezzel a progressbar scriptel?
« Dátum: 2011. december 29. - 11:16:06 »
0 Show voters
#define FILTERSCRIPT
#include <a_samp>
#include <progressbar>
#pragma tabsize 0
new Bar:kocsihp[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnFilterScriptInit()
{
SetTimer(\"asder\",500,1);
for(new i; i < MAX_PLAYERS; i++)
{
kocsihp = CreateProgressBar(548.00, 57.00, 58.50, 5.50, 4448426, 1000.0);
HideProgressBarForAll(kocsihp);
}
return 1;
}
public OnFilterScriptExit()
{
for(new i; i < MAX_PLAYERS; i++)
{
DestroyProgressBar(kocsihp);
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SetTimer(\"kesleltetes\",2000,0);
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
SetTimer(\"kesleltetes2\",2000,0);
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
 
/*----------------------------------*/
forward asder(playerid);
public asder(playerid)
{
        /*-----*/
              new Float:health;
               GetVehicleHealth(GetPlayerVehicleID(playerid), health);
               SetProgressBarValue(kocsihp[playerid], health);
               UpdateProgressBar(kocsihp[playerid], playerid);
   return 1;
}
/*----------------------------------*/
forward kesleltetes(playerid);
public kesleltetes(playerid)
{
ShowProgressBarForPlayer(playerid,kocsihp[playerid]);
return 1;
}
forward kesleltetes2(playerid);
public kesleltetes2(playerid)
{
HideProgressBarForPlayer(playerid,kocsihp[playerid]);
return 1;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal