Scout Sniper Only
Hello, i made this topic if someone of the AMXX scripters her can look in the below code and tell me if the scripts have any faults. The plugin is working as it should be but actualy i don't know what i have done and just copied parts of other plugins. The only thing i'm not sure of if all the ";" signs are needed what i writed.
Code:
#include <amxmodx> |
Re: Scout Sniper Only
Semicolons are optional - but it looks good, as it denontes the end of a statement
As for your code, you can make it as simple as this. PHP Code:
|
Re: Scout Sniper Only
Thanks for the help M249-M4A1! If i would change the given gun on a later time would the below code be correct to?
Code:
|
Re: Scout Sniper Only
Have a look at this plugin : http://forums.alliedmods.net/showthread.php?p=18295
|
Re: Scout Sniper Only
Thanks for the idea connorr but honestly said the script code what i writed wasn't meant to change all snipers in scout's. I used that only as test and want to change commands like cl_rebuy, rebuy and some others. I know there is also a nice command restricter plugin from SubStream but i preffer i small simply plugin and that i can give any command a new function. Can anybody confirm if the 2nd script code is correct?
|
Re: Scout Sniper Only
Referring to your post about other guns, yes that would be fine. The only problem I can see right now is that they are changing to a weapon they don't have. My only suggestion is to make them drop the weapon-to-be-switched-out and give them the new weapon (and maybe subtract money to avoid weapon spamming)
EDIT: I haven't played CS in ages. Is the weapon name mean BUY the weapon or USE the weapon? |
Re: Scout Sniper Only
Buy.
I think you give the weapon's classname to use it. so scout To buy one, and weapon_scout To use it. (I could be wrong there, though ;-) ) |
Re: Scout Sniper Only
I'm getting away off topic now but can enybody help me with the red line in the below mentioned script. Honestly said i'm doing something that maybe make no sense because i just grabbed parts of script and placed it into one script.
Code:
#include <amxmodx>Code:
public bool:check_ak47( id ) { |
Re: Scout Sniper Only
For the line in red, do get_user_weapon, not get_user_weapons
|
Re: Scout Sniper Only
Quote:
Just replace : if(get_user_weapons(id) == CSW_AK47){ with if( check_ak47( id ) ) { Note that check_ak47( id ) doen't need to be public. |
| All times are GMT -4. The time now is 01:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.