Raised This Month: $32 Target: $400
 8% 

plugin api


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 11-28-2019 , 14:14   plugin api
Reply With Quote #1

can some one create api of this plugin

i want to use sp_give_user_points(id, amount)

tried but didnt worked so if some can give code.

ty.
__________________

Last edited by Sanjay Singh; 11-29-2019 at 03:01.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 11-28-2019 , 16:36   Re: plugin api
Reply With Quote #2

register native in plugin_natives forward
Code:
register_native( "sp_set_user_points" , "native_sp_set_user_points")
put the function in plugin
Code:
public native_sp_set_user_points(iPlugin , iParam) {     if(!iParam)     {         return 0     }     new id     id = get_param(1)     if(!id)     {         return 0     }     g_iPoints[id] = get_param(2) }

and add this in include file
Code:
/**  * Set's client SkillPoints amount  *  * @param               id - index of player  *  * @param               amount - amount to set player points  */ native sp_set_user_points(id , amount)

Last edited by LearninG; 11-28-2019 at 16:37.
LearninG is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 11-29-2019 , 02:27   Re: plugin api
Reply With Quote #3

Thanks.
__________________

Last edited by Sanjay Singh; 11-29-2019 at 03:01.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
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 09:23.


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