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

Solved Native with boolean param


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-14-2017 , 20:55   Native with boolean param
Reply With Quote #1

How can you create a native with boolean param ?

For example

PHP Code:
nv_set_allow_user(iPlayertrue
PHP Code:
public plugin_natives()
{
      
register_library("include_lib")
      
register_native("nv_set_allow_user""native_set_allow_user")
}

public 
native_set_allow_user(plugin_idnum_params)
{
     new 
iPlayer get_param(1)
     
// ahm second param ? 

__________________

Last edited by Depresie; 10-15-2017 at 12:50.
Depresie is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2017 , 22:37   Re: Native with boolean param
Reply With Quote #2

Since a boolean is simply an integer in this language, I suspect that you do this:

Code:
new bool:myBoolean = bool:get_param(2)
__________________
fysiks is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-15-2017 , 01:08   Re: Native with boolean param
Reply With Quote #3

One off topic question, what can be stored in pev_euser ? i know iuser is for int, fuser for floats, vuser for vectors and noise for strings, but i have no idea about euser
__________________
Depresie is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-15-2017 , 02:13   Re: Native with boolean param
Reply With Quote #4

euser -> Int
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

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 04:22.


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