Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Text:healcina[MAX_PLAYERS];
- new Text:armorcina[MAX_PLAYERS];
- public OnGameModeExit();
- {
- for(new i; i<GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- TextDrawDestroy(healcina[i]);
- TextDrawDestroy(armorcina[i]);
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- healcina[playerid] = TextDrawCreate(566.000000, 67.000000, "100");
- TextDrawBackgroundColor(healcina[playerid], 255);
- TextDrawFont(healcina[playerid], 1);
- TextDrawLetterSize(healcina[playerid], 0.340000, 0.799998);
- TextDrawColor(healcina[playerid], -6291201);
- TextDrawSetOutline(healcina[playerid], 1);
- TextDrawSetProportional(healcina[playerid], 1);
- armorcina[playerid] = TextDrawCreate(566.000000, 45.000000, "100");
- TextDrawBackgroundColor(armorcina[playerid], 255);
- TextDrawFont(armorcina[playerid], 1);
- TextDrawLetterSize(armorcina[playerid], 0.340000, 0.799998);
- TextDrawColor(armorcina[playerid], 1778319615);
- TextDrawSetOutline(armorcina[playerid], 1);
- TextDrawSetProportional(armorcina[playerid], 1);
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawDestroy(healcina[playerid]);
- TextDrawDestroy(armorcina[playerid]);
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, healcina[playerid]);
- new Float:pancir;
- GetPlayerArmour(playerid, pancir);
- if(pancir >= 1) TextDrawShowForPlayer(playerid, armorcina[playerid]);
- else TextDrawHideForPlayer(playerid, armorcina[playerid]);
- }
- public OnPlayerUpdate(playerid)
- {
- new Float:energija;
- new kurbla[15];
- GetPlayerHealth(playerid, energija);
- format(kurbla, sizeof(HealthNum), "%.0f", energija);
- TextDrawSetString(healcina[playerid], kurbla);
- TextDrawShowForPlayer(playerid, healcina[playerid]);
- new Float:Pancir;
- GetPlayerArmour(playerid, Pancir);
- if(Pancir >= 1)
- {
- new Pancirkaaa[15];
- format(Pancirkaaa, 15, "%.0f", Pancir);
- TextDrawSetString(armorcina[playerid], Pancirkaaa);
- TextDrawShowForPlayer(playerid, armorcina[playerid]);
- }
- else
- {
- TextDrawHideForPlayer(playerid, armorcina[playerid]);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement