Raised This Month: $ Target: $400
 0% 

Solved World not allowed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JanDev
Junior Member
Join Date: Feb 2017
Old 02-21-2017 , 16:50   World not allowed
Reply With Quote #1

I'm pretty new to this forum, but I hope you can help me a bit

So I've modified a little knife plugin for me and my friends on a LAN server and I get some errors.

Code:
public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));

	if (GetClientTeam(client) > 1 && !IsPlayerAlive(client))
	{
		return;
	}
	
	new iWeapon = GetPlayerWeaponSlot(client, 2);
	new iItem;
	
	switch(weapon_choose[client]) {
		case 1: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_bayonet");}
		case 2: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_knife_gut");}
		case 3: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_knife_flip");}
		case 4: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_knife_m9_bayonet");}
		case 5: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_knife_karambit");}
		case 6: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_knife_tactical");}
		case 7: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_knife_butterfly");}
		case 8: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_knife_push");}
		case 9: if(IsValidEntity(iWeapon) && iWeapon != INVALID_ENT_REFERENCE) 
		{RemovePlayerItem(client, iWeapon), RemoveEdict(iWeapon), iItem = GivePlayerItem(client, "weapon_knife_survival_bowie");}
		default: {return;}
	}
	EquipPlayerWeapon(client, iItem);
}
I get this error (sometimes, I cant meassure when.):

Code:
L 02/21/2017 - 16:00:50: [SM] Exception reported: World not allowed
L 02/21/2017 - 16:00:50: [SM] Blaming: KNIFE.smx
L 02/21/2017 - 16:00:50: [SM] Call stack trace:
L 02/21/2017 - 16:00:50: [SM]   [0] EquipPlayerWeapon
L 02/21/2017 - 16:00:50: [SM]   [1] Line 359, /home/groups/sourcemod/upload_tmp/phpjiKbkU.sp::PlayerSpawn

Last edited by JanDev; 02-22-2017 at 08:16.
JanDev is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-21-2017 , 17:13   Re: World not allowed
Reply With Quote #2

No matter how new you are, you should know the difference between AMXModX and SourceMod.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
JanDev
Junior Member
Join Date: Feb 2017
Old 02-21-2017 , 17:29   Re: World not allowed
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
No matter how new you are, you should know the difference between AMXModX and SourceMod.
I know the difference. I'm just too dumb/tired to read.
I'll repost it in the right forum tomorrow... (Maybe anyone writes a solution till tomorrow idk, but I need to sleep now.)
JanDev is offline
Reply


Thread Tools
Display Modes

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 20:48.


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