Thread: [Subplugin Submission] [STOCK] zp_get_user_human
View Single Post
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-11-2017 , 18:33   [STOCK] zp_get_user_human
Reply With Quote #1

.: Description :.
Quote:
This stock checks if user is human. Returns true on success and false on fail.
.: Stock :.
PHP Code:
stock zp_get_user_human(id) {
    
    if(!(
zp_get_user_survivor(id) && zp_get_user_zombie(id) && zp_get_user_nemesis(id))) 
    return 
1;
    
    return 
0;

.: Usage :.
PHP Code:
#include <amxmodx>
#include <zombieplague>

#define PLUGIN "[STOCK] zp_get_user_human"
#define VERSION "1.0"
#define AUTHOR "DoNii"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
}

public 
zp_user_humanized_post(id) {
    
    if(
zp_get_user_human(id)) 
    
client_print(idprint_chat"You're A Human");
}

zp_get_user_human(id) {
    
    if(!(
zp_get_user_survivor(id) && zp_get_user_zombie(id) && zp_get_user_nemesis(id))) 
    return 
1;
    
    return 
0;

__________________

Last edited by edon1337; 03-21-2017 at 11:35.
edon1337 is offline