problem with onplayerdisconnect
#1

PHP код:
    new str[128], name[MAX_PLAYER_NAME];
    new 
Float:hp;
    
GetPlayerName(playeridnamesizeof(name));
    
format(str,sizeof(str), "{c3c3c3}(INFO) %s ( %d ) has left the game (with %s hp left)",PlayerName[playerid], playeridhp);
    
SendClientMessageToAll(-1,str); 
It's like the health hp of the player when disconnecting is not whowing, whats causing it lol.


EDIT:

nvm forgot to add
PHP код:
new Float:hp GetPlayerHealth(playeridhp); 
Reply
#2

Quote:
Originally Posted by wallen
Посмотреть сообщение
...
PHP код:
new Float:hp GetPlayerHealth(playeridhp); 
Hell no, that's not how you use this function. GetPlayerHealth RETURNS 1 on success and 0 on failure.

PHP код:
new Float:player_hp;
GetPlayerHealth(playeridplayer_hp); 
Reply
#3

Oh, appreciated lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)