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

Donate DrPoints


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 06-22-2015 , 12:29   Donate DrPoints
Reply With Quote #1

Hi,
iam searching a code to donate drpoints
like : say /donate and choose a player to give him points..

PS : iam using this points plugin
PHP Code:
/*------------------------------------- Point System ---------------------------------------------------------*/
public eDeath() 
{
    new 
attacker read_data(1)
    new 
victim read_data(2)
    new 
headshot read_data(3)
    
    if(
cs_get_user_team(attacker) != cs_get_user_team(victim)) // Kill Enemie
    
{
        
g_points[attacker] += 1
    
}
    
    else
    {
        if(
attacker == victim// Suicide
        

            
g_points[attacker] += 0
        
}
        
        else 
// Team Kill (Not necessary check if friendlyfire is enabled)
        
{
            if(!
headshot)
                
g_points[attacker] += 1            
            
else
                
g_points[attacker] += 1
            
        
}
    }
        if(
get_pcvar_num(SavePoints))
        
System_Save(attacker);
}

public 
cmd_give_ap(id,level,cid){
    if (!
cmd_access(idlevelcid2))
    {                
        
console_print(id"")
        return 
PLUGIN_HANDLED
    
}        
    if(
is_user_connected(id)){
    
        new 
name[32], count[32]
        
read_argv(1name31)
        
read_argv(2count31)
    
        new 
ilosc=str_to_num(count)
        new 
player cmd_target(idnameCMDTARGET_ALLOW_SELF)        
        
g_points[player]+=ilosc    
        
if(get_pcvar_num(SavePoints))
        
System_Save(player);
    }
    return 
PLUGIN_HANDLED

ZiZox is offline
Send a message via Skype™ to ZiZox
InsanityKARAI
Member
Join Date: Jul 2014
Old 06-22-2015 , 17:39   Re: Donate DrPoints
Reply With Quote #2

Set points as admin or donate points ?

Last edited by InsanityKARAI; 06-22-2015 at 17:39.
InsanityKARAI is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 06-26-2015 , 07:50   Re: Donate DrPoints
Reply With Quote #3

Please enter full source Or :
Public Natives
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 07-11-2015 , 17:32   Re: Donate DrPoints
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <colorchat>

#define    PLUGIN    "donate_Point"
#define    VERSION    "1.5"
#define    AUTHOR    "ok"
native dev_get_user_points(id)
    
native dev_set_user_points(idamount)
    
new 
players_menuplayers[32], numi
new accessmenuiName[64], callback
public plugin_init()
{    
    
register_plugin(PLUGINVERSIONAUTHOR
    
register_clcmd("say /donate""transfer_menu"ADMIN_ALL"")    
    
register_clcmd("say donate""transfer_menu"ADMIN_ALL"")
    
    
    
register_clcmd("transfer""transfer_ammo"ADMIN_ALL"")
}
public 
transfer_menu(id)
{   
    
get_players(playersnum"h")       
    if (
num <= 1)  
    {       
        
set_hudmessage(01550, -1.00.400.05.01.01.0false)                 
        
show_hudmessage(id,"")       
        return 
PLUGIN_HANDLED    
    
}   
    
    new 
tempname[32], info[10]  
    
    
players_menu menu_create("\r[AMXX] \wDonate Menu""players_menu_handler")  
    
    for(
0numi++) 
    {       
        if(
players[i] == id)           
            continue  
        
        
get_user_name(players[i], tempname31)       
        
num_to_str(players[i], info9)       
        
menu_additem(players_menutempnameinfo0)    
    }       
    
menu_setprop(players_menuMPROP_EXITMEXIT_ALL)  
    
    
menu_display(idplayers_menu0)   
    return 
PLUGIN_CONTINUE
}

public 
players_menu_handler(idplayers_menuitem)

    if(
item == MENU_EXIT)   
    {       
        
menu_destroy(players_menu)       
        return 
PLUGIN_HANDLED   
    
}    
    
    new 
data[6]  
    
    
menu_item_getinfo(players_menuitemaccessmenudatacharsmax(data), iNamecharsmax(iName), callback
    
    new 
player str_to_num(data)  
    
    
client_cmd(id"messagemode ^"transfer %i^""player)  
    
    return 
PLUGIN_CONTINUE
}

public 
transfer_ammo(id)
{    
    new 
param[6]    
    
read_argv(2paramcharsmax(param))
    
    for (new 
xstrlen(param); x++)    
    {       
        if(!
isdigit(param[x]))       
        {            
            
set_hudmessage(25500, -1.00.400.05.01.01.0false)            
            
show_hudmessage(id,"")            
            return 
0        
        
}    
    }    
    
    new 
amount str_to_num(param)   
    
    new 
ammo dev_get_user_points(id
    
    if (
ammo amount)    
    {             
        
set_hudmessage(25500, -1.00.400.05.01.01.0false)             
        
show_hudmessage(id,"")        
        return 
0    
    

    
    
read_argv(1paramcharsmax(param))   
    new 
player str_to_num(param
    
    new 
player_ammo dev_get_user_points(player)
    
    
dev_set_user_points(idammo amount)    
    
dev_set_user_points(playerplayer_ammo amount)    
    
    new 
names[2][32]        
    
    
get_user_name(idnames[0], 31
    
    
get_user_name(playernames[1], 31)        
    
ColorChat(0GREY"^4[AMXX] ^1Player :^4 %s  ^1Give  ^4%d ^1:  Point  For  Player : ^4%s ^1!"names[0], amountnames[1]) 
    return 
0

Try This
__________________
Moroccan and proud
Linkin Hisoka is offline
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 07-11-2015 , 20:08   Re: Donate DrPoints
Reply With Quote #5

Quote:
Originally Posted by Linkin Hisoka View Post
Try This
Thanks Bro
__________________

Last edited by ZiZox; 07-11-2015 at 20:08.
ZiZox is offline
Send a message via Skype™ to ZiZox
Linkin Hisoka
Senior Member
Join Date: Sep 2014
Location: Morocco, Marrakesh
Old 07-13-2015 , 16:27   Re: Donate DrPoints
Reply With Quote #6

Enjoy
__________________
Moroccan and proud
Linkin Hisoka is offline
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 07-13-2015 , 16:38   Re: Donate DrPoints
Reply With Quote #7

;)!
__________________
ZiZox is offline
Send a message via Skype™ to ZiZox
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 07-14-2015 , 08:47   Re: Donate DrPoints
Reply With Quote #8

*Bump*
__________________
ZiZox is offline
Send a message via Skype™ to ZiZox
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 07-14-2015 , 09:46   Re: Donate DrPoints
Reply With Quote #9

Stop bumping your threads after a few hours!
It is forbidden by the forum rules
__________________

Mordekay is offline
ZiZox
Senior Member
Join Date: Sep 2014
Location: Morocco
Old 07-14-2015 , 10:50   Re: Donate DrPoints
Reply With Quote #10

mmm , Today , 07:47 AM - Yesterday , 038 PM
__________________
ZiZox is offline
Send a message via Skype™ to ZiZox
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:33.


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