Great plugin, I made a wrapper for this that auto gives unlimited HE
grenades on player's first spawn. Using this plugin along with L. Duke's
supernades plugin makes for some noobtacular fragfests on my
deathmatch server.
I'd like to help fix a minor problem. When I issue the command
from the console via rcon targeting any player the plugin gives
me a
grenade even if I am spectating and this message is logged to the
SM errors file. (The target does get unlimited grenades though).
Code:
L 09/08/2008 - 19:13:25: [SM] Native "GivePlayerItem" reported: World not allowed
L 09/08/2008 - 19:13:25: [SM] Displaying call stack trace for plugin "Custom\UnlimitedGrenades.smx":
L 09/08/2008 - 19:13:25: [SM] [0] Line 159, UnlimitedGrenades.sp::GiveNades()
L 09/08/2008 - 19:13:25: [SM] [1] Line 94, UnlimitedGrenades.sp::Command_UnlimitedGrenades()
After a little debugging I traced the problem to the 1st param of the
GivePlayerItem() call in the GiveNades() function.
Code:
case 1:
{
if(StrEqual(Grenade, "he"))
{
if(HasUnlimitedHE[target] == false)
{
HasUnlimitedHE[target] = true;
PrintToChat(target, "\x04[SM] \x01Your have been giving \x04Unlmited HE Grenades");
ReplyToCommand(client,"[SM] %s Has been giving unlimited HE grenade", TargetName);
GivePlayerItem(client, "weapon_hegrenade");
This tweak fixed it in my case:
Code:
GivePlayerItem(target, "weapon_hegrenade");
The other two grenade cases have the same issue.
Thanks again for this very cool plugin!