Jump to content
  • 0

Question

Posted

Am un server PPC_Trucking si am o problema cu Health la pleyeri(all) cand ma ciurui cu un player is cade viata si cand ar trebuii sa moara ii creste viata la loc cu as putea rezolva asta?

560x95_F01616_1625F2_030303_000000.png

8 answers to this question

Recommended Posts

Posted

[pawn]// Heals all players

COMMAND:healall(playerid, params[])

{

// Send the command to all admins so they can see it

SendAdminText(playerid, "/healall", params);

// Check if the player has logged in

if (APlayerData[playerid][LoggedIn] == true)

{

// Check if the player's admin-level is at least 3

if (APlayerData[playerid][PlayerLevel] >= 3)

{

// Loop through all players

for (new i; i < MAX_PLAYERS; i++)

if (IsPlayerConnected(i)) // Check if the player is connected

    if (IsPlayerInAnyVehicle(i) == 0) // Check if the player isn't inside a vehicle

        SetPlayerHealth(i, 100.0); // Heal the player

// Send all players a message to inform them that all players have been healed

SendClientMessageToAll(0x00FF00FF, "All players have been healed!");

}

else

    return 0;

}

else

    return 0;

// Let the server know that this was a valid command

return 1;

}

[/pawn]

560x95_F01616_1625F2_030303_000000.png
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.