AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [STOCK] zp_get_user_human (https://forums.alliedmods.net/showthread.php?t=293829)

edon1337 02-11-2017 18:33

[STOCK] zp_get_user_human
 
.: 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;



Relaxing 02-12-2017 15:32

Re: [STOCK] zp_get_user_human
 
Is this a thing? *never messed around with zp*

edon1337 02-12-2017 15:54

Re: [STOCK] zp_get_user_human
 
You don't need a new include file for a simple stock.


All times are GMT -4. The time now is 14:04.

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