Raised This Month: $ Target: $400
 0% 

Solved is in array ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-29-2017 , 11:37   Re: is in array ?
Reply With Quote #10

I will gladly integrate it more into your plugin if you give me more information or the code.

This will keep track of all skins, their unique ID's and which skins the player has been given. Everything saved in nVault of course.
Use AddSkinToPlayer() to give users skins and GetSkinInfo() to retrieve the information about a certain skin.
If you want it more efficient you can use the trie directly instead of using GetSkinInfo().

To enumerate all skins (for a buy menu):
Code:
new tempSkinID, NumSkins = ArraySize(ghAllSkins); for ( new i ; i < NumSkins ; i++ ) {     tempSkinID = ArrayGetCell(ghAllSkins, i); }

To enumerate a player's skins (for a selection menu):
Code:
new tempSkinID, NumSkins = ArraySize(ghPlayerSkins[id]); for ( new i ; i < NumSkins ; i++ ) {     tempSkinID = ArrayGetCell(ghPlayerSkins[id], i); }

If you have any questions just ask.
Spoiler

Last edited by Black Rose; 07-29-2017 at 11:50.
Black Rose is offline
 



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 23:08.


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