Raised This Month: $ Target: $400
 0% 

cs_set_user_model(id,"vip") Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bhatti_rulez_
Member
Join Date: Mar 2014
Old 04-25-2014 , 20:14   cs_set_user_model(id,"vip") Help
Reply With Quote #1

Code:
                                     cs_reset_user_model(id); 
                                     cs_set_user_model(id,"vip");
i guys i am making knife shop and i want bit help i got deagle as item when you buy it i want it change skin when you buy it and if he dies and respawn again he should have normal skin is that possible please help
__________________
PM ME For private work everything ;)

[ Knife-Shop ] 88% done
bhatti_rulez_ is offline
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 04-25-2014 , 23:59   Re: cs_set_user_model(id,"vip") Help
Reply With Quote #2

About your title ?
In you description you dont say nothing about cs_set_user_Vip you need an deagle model insert in menu for one life.

( Please change your title )
swapped is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-26-2014 , 07:21   Re: cs_set_user_model(id,"vip") Help
Reply With Quote #3

put the script that we can help you.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Spawner30
BANNED
Join Date: Dec 2013
Location: I Don't Know Yet
Old 04-26-2014 , 08:21   Re: cs_set_user_model(id,"vip") Help
Reply With Quote #4

Yes you may put the script to fix the prob
Spawner30 is offline
Send a message via Skype™ to Spawner30
bhatti_rulez_
Member
Join Date: Mar 2014
Old 04-26-2014 , 10:40   Re: cs_set_user_model(id,"vip") Help
Reply With Quote #5

noo you getting me wrong sorry i forgot to say i mean the skin of player
i will replace ;) the skin but i just want when some one buys deagle from shop they turn in to that skin and if they die and when they get respawn again the skin should be normal
__________________
PM ME For private work everything ;)

[ Knife-Shop ] 88% done

Last edited by bhatti_rulez_; 04-26-2014 at 10:41.
bhatti_rulez_ is offline
Old 04-26-2014, 15:39
bhatti_rulez_
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
Spawner30
BANNED
Join Date: Dec 2013
Location: I Don't Know Yet
Old 04-26-2014 , 15:49   Re: cs_set_user_model(id,"vip") Help
Reply With Quote #6

PHP Code:
RegisterHamHam_Spawn"player""Respawn"); 

Last edited by Spawner30; 04-26-2014 at 15:50.
Spawner30 is offline
Send a message via Skype™ to Spawner30
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-26-2014 , 16:18   Re: cs_set_user_model(id,"vip") Help
Reply With Quote #7

Quote:
Originally Posted by bhatti_rulez_ View Post
noo you getting me wrong sorry i forgot to say i mean the skin of player
i will replace ;) the skin but i just want when some one buys deagle from shop they turn in to that skin and if they die and when they get respawn again the skin should be normal


PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <Hamsandwich>
#include <cstrike>

new bool:gHasDeagleShop[33] = false

public plugin_init()
{
          
register_plugin("plugin""version""author")

          
RegisterHam(Ham_Spawn"player""FwPlayerSpawned"1)
          
RegisterHam(Ham_Respawn"player""FwPlayerSpawned"1)

          
register_clcmd("say /deagleshop""givedeagleshop")
}
public 
FwPlayerSpawned(id)
{
          if(!
is_user_alive(id))
                    return 
HAM_HANDLED

          
if(gHasDeagleShop[id])
          {
                      
gHasDeagleShop[id] = false
                      cs_reset_user_model
(id)
          }
          return 
HAM_HANDLED
}
public 
givedeagleshop(id)
{
          
give_item(id"weapon_deagle")
          
gHasDeagleShop[id] = true
          cs_set_user_model
(id"vip")


Last edited by Natsheh; 04-26-2014 at 17:01.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 04-26-2014 , 16:50   Re: cs_set_user_model(id,"vip") Help
Reply With Quote #8

You are setting this to false in FwPlayerKilled
PHP Code:
gHasDeagleShop[victim] = false 
Then
PHP Code:
public FwPlayerSpawned(id)
{
          if(!
is_user_alive(id))
                    return 
HAM_HANDLED

          
if(gHasDeagleShop[id])   // THIS WILL ALWAYS BE FALSE :)
          
{
                      
gHasDeagleShop[id] = false
                      cs_reset_user_model
(victim)
          }
          return 
HAM_HANDLED

Don't modify gHasDeagleShop[victim] in Ham_Killed ^^
NikKOo31 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-26-2014 , 17:02   Re: cs_set_user_model(id,"vip") Help
Reply With Quote #9

My Bad.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



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 01:16.


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