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

Help with native's


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-15-2012 , 12:11   Help with native's
Reply With Quote #1

Hello there,

Im trying to make a JBshop but i dont know how i can get my jbcash into the jbshop so i have to use natives
But how?
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-15-2012 , 13:19   Re: Help with native's
Reply With Quote #2

PHP Code:
public plugin_natives()
{
    
register_library ("jbshop_cash")
    
register_native ("jbcash_get_user_cash""_get_cash")
    
register_native ("jbcash_set_user_cash""_set_cash")

PHP Code:
public _get_cash(pluginparams)
{
        return 
iCash[get_param(1)]
}
 
public 
_set_cash(pluginparams)
{
        new 
iPlayer get_param (1)
        
iCash[iPlayer] = max(0get_param(2))
        return 
iCash [iPlayer]

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-15-2012 , 13:22   Re: Help with native's
Reply With Quote #3

I mean for example: JBcash: %i

Inside the JBshop

Edit: thanks for the example, but i dont understand it as well
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.

Last edited by Bilal Pro; 04-15-2012 at 13:25.
Bilal Pro is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-15-2012 , 13:25   Re: Help with native's
Reply With Quote #4

PHP Code:
new iCash[33]

register_event("DeathMsg""eDeath")
register_clcmd("say /cash""SayCash")

public 
eDeath() {
    
iCash[read_data(2)]++
}

public 
SayCash(id) {
    
client_print(idprint_chat"Your current cash: %i"iCash[id])

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-15-2012 , 13:28   Re: Help with native's
Reply With Quote #5

This is not what i ment, i have to explain it to u on a better style.

I want from my JBcash plugin a native to my JBshop and inside the JBshop theres a button where u can see ur current cash for example

Jailbreak Shop
Your JBcash: %i

1. weapons
2. grenades
3. knifes

But i dont know how
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-15-2012 , 13:47   Re: Help with native's
Reply With Quote #6

use formatex.

PHP Code:

new szTemp[500]
formatex(szTempcharsmax(szTemp), "Jailbreak Shop^n Your JBCash: %i"iCash[id])

new 
menu menu_create(szTemp"menu_handler")

menu_additem(menu"Weapons""1")
menu_additem(menu"Grenades""2")
menu_additem(menu"Knifes""3")

menu_display(idmenu
__________________

Last edited by Napoleon_be; 04-15-2012 at 13:47.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-15-2012 , 13:59   Re: Help with native's
Reply With Quote #7

Lol, you still dont get it i got 2 plugins, JBcash and JBshop

How will i get the users JBcash in an other plugin?
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-15-2012 , 15:10   Re: Help with native's
Reply With Quote #8

I dont understand it :S
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
kapzz
Member
Join Date: Mar 2012
Location: Mars
Old 04-15-2012 , 15:31   Re: Help with native's
Reply With Quote #9

maybe with xvars
http://forums.alliedmods.net/showthread.php?t=138880

Last edited by kapzz; 04-15-2012 at 15:33.
kapzz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-15-2012 , 17:01   Re: Help with native's
Reply With Quote #10

Quote:
Originally Posted by kapzz View Post
They don't work with arrays.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 22:08.


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