AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Pointslay (https://forums.alliedmods.net/showthread.php?t=133412)

snowyledge 07-24-2010 23:34

Pointslay
 
Hello, I made this thread for my friend since he does not have an account. He asked me if he could fix his code,

PHP Code:

#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Pointslay"
#define VERSION "1.0"
#define AUTHOR "jeff"
#define ADMIN_LEVEL ADMIN_BAN
public plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
register_clcmd("+adminslay""Slayaim"ADMIN_LEVEL)
}
Slayaim(id)
{
 new 
playerbody;
 new 
szPlayerName[32];
 
get_user_aiming(idplayerbody);
 
get_user_name(playerszPlayerName32);
 if (
get_user_flags(id) & ADMIN_BAN)
 {
  if (
is_user_alive(player) && get_user_flags(player) & ADMIN_IMMUNITY)
  {
   
client_print(id"You cant slay some one with Immunity!");
  }
  else
  if (
is_user_alive(player))
  {
   
user_kill(player);
   
client_print(player"You have been Slayed!");
   
client_print(id"You just Slayed %s!"szPlayerName);
  }
 }



YamiKaitou 07-24-2010 23:47

Re: Pointslay
 
First, Slayaim must be public.
Second, it is always best to provide the errors that you need assistance with.
Third, http://amxmodx.org/funcwiki.php?go=func&id=22
Fourth, I thought you claimed you make plugins?

nikhilgupta345 07-25-2010 00:05

Re: Pointslay
 
Wait, is that your friend's original code? Or is that his "fixed" code?

drekes 07-25-2010 00:11

Re: Pointslay
 
Quote:

Originally Posted by nikhilgupta345 (Post 1250699)
Wait, is that your friend's original code? Or is that his "fixed" code?

If that is the fixed one, i would like to see the original :shock:

snowyledge 07-25-2010 11:27

Re: Pointslay
 
This is the original drekes.

snowyledge 07-25-2010 11:30

Re: Pointslay
 
Its a warning, and when my friend does the command "+adminslay" it doesnt work.

Warning:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
C:\Users\jeff\Desktop\jeffs compiler\pointslay.sma(38) : warning 203: symbol is never used: "Slayaim"
Header size: 140 bytes
Code size: 144 bytes
Data size: 168 bytes
Stack/heap size: 16384 bytes; estimated max. usage=778 cells (3112 bytes)
Total requirements: 16836 bytes
1 Warning.
Done.
Compilation Time: 7.30 sec
No clue about that smiley thing or w.e why that showed up.

nikhilgupta345 07-25-2010 11:36

Re: Pointslay
 
Umm do what yami old you to do. Make slayaim public and in the client_print put print_chat before the message..

snowyledge 07-25-2010 11:43

Re: Pointslay
 
My friend doesn't understand that.

nikhilgupta345 07-25-2010 11:46

Re: Pointslay
 
Do it for him?

snowyledge 07-25-2010 12:00

Re: Pointslay
 
Could you just give me the sma with it, I only get the public part


All times are GMT -4. The time now is 00:10.

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