|
./includes/perp.pwn(99081) : error 017: undefined symbol "PLAYER_STATE_ALIVE" ./includes/perp.pwn(99084) : error 017: undefined symbol "PLAYER_STATE_ALIVE" |
|
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID) { new Float:health; PlayerInfo[playerid][pLastDamagetime] = gettime(); GetPlayerHealth(playerid, health); if(GetPlayerTeam(playerid) != PLAYER_STATE_ALIVE && PlayerInfo[playerid][pDeaths]) SetPlayerHealth(playerid, health); if(GetPlayerTeam(playerid) == PLAYER_STATE_ALIVE) { if(health - amount <= 30.0) { SendClientMessage(playerid, COLOR_LIGHTRED, "-> Suc khoe thap, ky nang ban sung o muc do trung binh."); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 200); SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 200); SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 200); SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 200); SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 200); SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 200); } } } |
|
Originally Posted by wiki
Код:
7 PLAYER_STATE_WASTED Player is dead or on class selection 8 PLAYER_STATE_SPAWNED Player is spawned |
if(GetPlayerTeam(playerid) == PLAYER_STATE_ALIVE)
GetPlayerTeam(playerid)
new team[MAX_PLAYERS];
#define TEAM1 1
CMD:team(playerid)
{
team[playerid] = TEAM1;
SetPlayerTeam(playerid, team[playerid]); // This function will set the player team.
return 1;
}
CMD:myteam(playerid)
{
if(GetPlayerTeam(playerid) == TEAM1) // To Get the Player team (TEAM1) using GetPlayerTeam.
{
SendClientMessage(playerid, -1, "Your team is TEAM1");
}
return 1;
}