Raised This Month: $ Target: $400
 0% 

Entity plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DannyQueen
Junior Member
Join Date: Jan 2015
Old 01-12-2015 , 10:55   Entity plugin
Reply With Quote #1

Hello Dear Friends!
-------------
Сan someone please help me with plugin [Problems: Error and Warning]
-------------
About plugin:
If the player with the admin status next to an ordinary player and has a distance of 2-3 unit then the admin player can steal all the money simple player. -> if the admin player write nickname

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

new iPlayers[32] ,playerCount, player ;

public plugin_init() 
{
	register_plugin("RobPlayer", "1.00", "DannyQueen")
	register_clcmd("say", "rob_say")
}

public rob_say(id)
{
	
	new szMsg[34];
	read_args(szMsg, charsmax(szMsg));
	
	if (strlen(szMsg) > 32)
	return PLUGIN_CONTINUE
		
	new iPlayers[32], szName[33] ,playerCount, player 
	get_user_name(player,szName,charsmax(szName));
	get_players(iPlayers, playerCount, "ach");
	
	for (new i = 0; i < playerCount; i++)
	{
		player = iPlayers[i] ;
		
		if (player == id) continue;
		
		if( entity_range(id, player) < 3.0)
		{
			if (equal(szMsg,szName))
			{				
				cs_set_user_money(id, cs_get_user_money(id) + cs_get_user_money(player))
			}
		}
	}	
}

Please! Help ME!
In our country havent forum of scripting :C

[ I'm newbie scripter C: And a foreigner... And perhaps in this text contains errors... (P.S. My english is BAD)]

THANKS FOR HELP!
DannyQueen is offline
 



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