[pawn]new Timer;
public Object(playerid)
{
SetPVarInt ( playerid, \"ObjectLoader\", 1 );
ShowProgressBarForPlayer(playerid,loading);
GetPlayerHealth(playerid, health);
TogglePlayerControllable(playerid, false); //lefagyasztás
GameTextForPlayer(playerid, \"~g~Objectek ~b~Betöltése!\", 2000, 6); //megjelenítendõ szöveg
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); //hang az objectek betöltése közben
Timer = SetTimerEx(\"Object2\", 300, true,\"e\",playerid); //Az meghívása 6 másodperc múlva
SetPlayerHealth(playerid, 100000);
return 1;
}
public Object2(playerid)
{
switch ( GetPVarInt ( playerid, \"ObjectLoader\" ) )
{
case 1: { SetProgressBarValue(loading[playerid],10), SetPVarInt ( playerid, \"ObjectLoader\", 2 ); UpdateProgressBar(loading[playerid], playerid);}
case 2: { SetProgressBarValue(loading[playerid],20), SetPVarInt ( playerid, \"ObjectLoader\", 3 );UpdateProgressBar(loading[playerid], playerid); }
case 3: { SetProgressBarValue(loading[playerid],30), SetPVarInt ( playerid, \"ObjectLoader\", 4 ); UpdateProgressBar(loading[playerid], playerid);}
case 4: { SetProgressBarValue(loading[playerid],40), SetPVarInt ( playerid, \"ObjectLoader\", 5 ); UpdateProgressBar(loading[playerid], playerid);}
case 5: { SetProgressBarValue(loading[playerid],50), SetPVarInt ( playerid, \"ObjectLoader\", 6 ); UpdateProgressBar(loading[playerid], playerid);}
case 6: { SetProgressBarValue(loading[playerid],60), SetPVarInt ( playerid, \"ObjectLoader\", 7 ); UpdateProgressBar(loading[playerid], playerid);}
case 7: { SetProgressBarValue(loading[playerid],70), SetPVarInt ( playerid, \"ObjectLoader\", 8 );UpdateProgressBar(loading[playerid], playerid); }
case 8: { SetProgressBarValue(loading[playerid],80), SetPVarInt ( playerid, \"ObjectLoader\", 9 ); UpdateProgressBar(loading[playerid], playerid);}
case 9: { SetProgressBarValue(loading[playerid],90), SetPVarInt ( playerid, \"ObjectLoader\", 10 ); UpdateProgressBar(loading[playerid], playerid);}
case 10:
{
SetPlayerHealth(playerid, health);
SetProgressBarValue(loading,100);
UpdateProgressBar(loading[playerid],playerid);
SetPVarInt ( playerid, \"ObjectLoader\", 0 );
TogglePlayerControllable(playerid,1);
GameTextForPlayer(playerid, \"~g~Objectek ~b~Betöltve!\", 2000, 6); //megjelenítendõ szöveg
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); //hang az objectek betöltése végén
HideProgressBarForPlayer(playerid,loading[playerid]);
KillTimer(Timer);
}
}
return 1;
}[/pawn]
Tess ittvan de ha segítettem és tényleg megy akkor
+