AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   is_user_connected and user alive (https://forums.alliedmods.net/showthread.php?t=237929)

GinNNy 04-01-2014 00:11

is_user_connected and user alive
 
hi is this correct?
if(is_user_connected(id) && is_user_alive(id))

cause its give me tag mismatch

Bos93 04-01-2014 00:36

Re: is_user_connected and user alive
 
is_user_alive already has check is_user_connected

hornet 04-01-2014 06:18

Re: is_user_connected and user alive
 
That alone won't give you a tag mismatch unless you have previously tagged id as something else.
Post the whole snippet.

extream87 04-01-2014 07:07

Re: is_user_connected and user alive
 
Only
Code:
if (is_user_alive(id))

To check dead player.
Code:
 if (!is_user_alive(id))

jimaway 04-02-2014 07:03

Re: is_user_connected and user alive
 
Quote:

Originally Posted by extream87 (Post 2118732)
Only
Code:
if (is_user_alive(id))

To check dead player.
Code:
 if (!is_user_alive(id))

you should also use is_user_connected when checking for dead players since is_user_alive will return false when player is not connected


All times are GMT -4. The time now is 05:59.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.