Raised This Month: $ Target: $400
 0% 

How to save the weapons of a player and give them again in another round?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-12-2009 , 16:27   How to save the weapons of a player and give them again in another round?
Reply With Quote #1

How to save the weapons of a player and give them again in another round?
thanks in advance
__________________
alan_el_more is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-12-2009 , 16:28   Re: How to save the weapons of a player and give them again in another round?
Reply With Quote #2

Save them in a global var by using get_user_weapons.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 04-12-2009 , 16:30   Re: How to save the weapons of a player and give them again in another round?
Reply With Quote #3

Look into one of the WC3 Mods, the "Ankh" items could help.
__________________
In Flames we trust!
Nextra is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 04-12-2009 , 21:12   Re: How to save the weapons of a player and give them again in another round?
Reply With Quote #4

PHP Code:
new weapons[32],weapnum,weapid,weapname[32]

/*save weapons*/
get_user_weapons(id,weapons,weapnum)



/*Load weapons*/
for(new 0weapnumi++)
{
    
weapid weapons[i];
    
get_weaponname(weapid,weapname,31)
    
give_item(id,weapname)

__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-12-2009 , 22:29   Re: How to save the weapons of a player and give them again in another round?
Reply With Quote #5

Quote:
Originally Posted by Starsailor View Post
PHP Code:
new weapons[32],weapnum,weapid,weapname[32]

/*save weapons*/
get_user_weapons(id,weapons,weapnum)



/*Load weapons*/
for(new 0weapnumi++)
{
    
weapid weapons[i];
    
get_weaponname(weapid,weapname,31)
    
give_item(id,weapname)

thanks, i try it
__________________
alan_el_more is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-13-2009 , 03:59   Re: How to save the weapons of a player and give them again in another round?
Reply With Quote #6

Quote:
Originally Posted by Starsailor View Post
PHP Code:
new weapons[32],weapnum,weapid,weapname[32]

/*save weapons*/
get_user_weapons(id,weapons,weapnum)



/*Load weapons*/
for(new 0weapnumi++)
{
    
get_weaponname(weapons[i],weapname,31)
    
give_item(id,weapname)

You can directly pass weapons[i] as it is used only 1 time.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
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 02:24.


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