Raised This Month: $ Target: $400
 0% 

Entity plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-13-2015 , 09:59   Re: Entity plugin
Reply With Quote #7

Here's Babe if you want a working Code :*

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

public plugin_init() 
{
    
register_plugin("Rob Player""1.0""Natsheh & DannyQueen")
    
register_clcmd("say""rob_say")
}

public 
rob_say(id)
{
    new 
sArgs[34];
    
read_args(sArgscharsmax(sArgs));
    
    if(
strlen(sArgs) > 32)
        return
    
    new 
player find_player("ab"sArgs)
    
    if(!
player || get_entity_distance(idplayer) > 3.0 || id == player)
    {
        
client_print(idprint_chat"[ Robbing Failed ] Can not find a player near you with that name!")
        return
    }
    else if(!
cs_get_user_money(player))
    {
        
client_print(idprint_chat"[ Robbing Failed ] There is no money to rob from this player!")
        return
    }
    
    
cs_set_user_money(idcs_get_user_money(id) + cs_get_user_money(player))
    
cs_set_user_money(player0)


Sorry i fixed up the code, now the player can not rob himself

Last edited by Natsheh; 01-13-2015 at 16:31.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
 



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 15:32.


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