Raised This Month: $12 Target: $400
 3% 

Help / Support [Need Help] Set Player Model by ZV_MAIN flag plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jigore
Junior Member
Join Date: Jul 2018
Old 07-20-2018 , 17:43   [Need Help] Set Player Model by ZV_MAIN flag plugin
Reply With Quote #1

I am new to PAWN, so my arms made this plugin.
The plugin had no problems with compiling, but was not working at all
P.S Plugin is made for Zombie Plague 4.3

Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <zmvip>

#define PLUGIN "[ZP] VIP Model"
#define VERSION "0.1"
#define AUTHOR "gore"


new VIP_MODEL[] = "models/player/Transcendent_Michaela/Transcendent_Michaela.mdl"

public plugin_init() {

	register_plugin(PLUGIN, VERSION, AUTHOR) 
    
	RegisterHam(Ham_Spawn, "player", "SetModel", 1)

}

public plugin_precache() {
	
        precache_model(VIP_MODEL)

}

public SetModel(const id) {

	if(zv_get_user_flags(id) & ZV_MAIN && is_user_connected(id)) {

		cs_set_user_model(id, "Transcendent_Michaela")
		client_print(id, print_chat, "\yYou've just got VIP Player model")
		return PLUGIN_HANDLED
	}
	else
	{
	client_print(id, print_chat, "\rSorry, but you don't have VIP flags")
	}
	return PLUGIN_HANDLED
}
I need help making it work. pls.
__________________
pawn plugin maker.
actually new
jigore is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-21-2018 , 06:31   Re: [Need Help] Set Player Model by ZV_MAIN flag plugin
Reply With Quote #2

PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < zombieplague >
#include < zmvip >

new g_szModelName[ ] = "Transcendent_Michaela";

public 
plugin_init( )
{
    
register_plugin"[ZP] VIP Model""1.0""DoNii" );
    
RegisterHamHam_Spawn"player""@HamSpawn_Post");
}

public 
plugin_precache( )
{
    new 
szBuffer64 ];
    
formatexszBuffercharsmaxszBuffer ), "models/player/%s/%s.mdl"g_szModelNameg_szModelName );
    
    
precache_modelszBuffer );
}

public @
HamSpawn_Postid )
{
    if( 
is_user_aliveid ) && ( zv_get_user_flagsid ) & ZV_MAIN ) )
    {
        
zp_override_user_modelidg_szModelName );
        
client_printidprint_chat"You just got the cool VIP Model." );
    }
    return 
HAM_IGNORED;

edon1337 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:31.


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