Raised This Month: $ Target: $400
 0% 

World not allowed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
JanDev
Junior Member
Join Date: Feb 2017
Old 02-22-2017 , 08:17   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 the following 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
JanDev 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 19:11.


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