View Single Post
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-31-2020 , 22:23   Re: Bad Camper 1.4.239
Reply With Quote #6

Quote:
Originally Posted by DJEarthQuake View Post
Code:
/* punish_slap(id, Float:punishPercentage) {     for (new slapCnt = 1; slapCnt <= floatround(3.0 * punishPercentage, floatround_ceil); slapCnt++)         user_slap(id, 0); } */ punish_slap(id, Float:punishPercentage){ for (new slapCnt = 1; slapCnt <= floatround(3.0 * punishPercentage, floatround_ceil); slapCnt++)         if(!is_user_bot(id) && is_user_alive(id) && is_user_connected(id))         {         user_slap(id, 0);         } }

If you are checking that the player is alive, there is no need to check that it is connected.

Syntax

native is_user_alive(index);


Description

Returns if the client is alive.

Note

This will never return true if a client is not connected. If you need
to know whether a client is alive, an additional call to
is_user_connected() is unnecessary.


Return

1 if client is alive, 0 otherwise
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr