Raised This Month: $51 Target: $400
 12% 

Skins-Menu errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Solaris15
Junior Member
Join Date: Jun 2019
Location: Romania
Old 06-17-2019 , 02:42   Skins-Menu errors
Reply With Quote #1

Hello I found this plugin and I have some errors when I compile it.


Source :

#include <sourcemod>
#include <sdktools>

public void OnPluginStart()
{
RegConsoleCmd("sm_models", Command_Skins, "Deschide un meniu cu modele");
}

public Action:Command_Skins(client, args)
{
Handle menu = CreateMenu(skinsmenu, MENU_ACTIONS_ALL);
SetMenuTitle(menu, "VIP Skins Menu");
new AdminId:id = GetUserAdmin(client);
if (id != INVALID_ADMIN_ID && GetAdminFlag(id, Admin_Ban) && GetAdminFlag(id, Admin_Reservation))
{
AddMenuItem(menu, "devman", "Devil - Admin + VIP");
if (id != INVALID_ADMIN_ID && GetAdminFlag(id, Admin_Vote) && GetAdminFlag(id, Admin_Reservation))
{
AddMenuItem(menu, "hman", "Hitman - Mod + VIP");
}
else
{
AddMenuItem(menu, "hman", "Hitman - Mod + VIP", ITEMDRAW_DISABLED);
}
}
else
{
AddMenuItem(menu, "devman", "Devil - Admin + VIP", ITEMDRAW_DISABLED);
}


AddMenuItem(menu, "pigman", "Pig");
AddMenuItem(menu, "alien", "Alien");
AddMenuItem(menu, "skullman", "Skull");
AddMenuItem(menu, "vampman", "Vampire");

DisplayMenu(menu, client, MENU_TIME_FOREVER);
}

public int skinsmenu(Menu menu, MenuAction action, int param1, int param2)
{
switch (action)
{
case MenuAction_Select:
{
//param1 is client, param2 is item

new String:item[64];
GetMenuItem(menu, param2, item, sizeof(item));


if (StrEqual(item, "hman"))
{
g_bCommandUsedDayModHit[param1] = true;
PrecacheModel("models/player/custom_player/voikanaa/agent47.mdl");
SetEntityModel(param1, "models/player/custom_player/voikanaa/agent47.mdl");
g_bCommandUsedDayAdmDev[param1] = false;
g_bCommandUsedDayAlien[param1] = false;
g_bCommandUsedDayPig[param1] = false;
g_bCommandUsedDaySkull[param1] = false;
g_bCommandUsedDayVamp[param1] = false;
return ITEMDRAW_DISABLED;

}
else
{
return ITEMDRAW_DEFAULT;
}

else if (StrEqual(item, "devman"))
{
g_bCommandUsedDayAdmDev[param1] = true;
PrecacheModel("models/player/dean/heister_devil.mdl");
SetEntityModel(param1, "models/player/dean/heister_devil.mdl");
g_bCommandUsedDayModHit[param1] = false;
g_bCommandUsedDayAlien[param1] = false;
g_bCommandUsedDayPig[param1] = false;
g_bCommandUsedDaySkull[param1] = false;
g_bCommandUsedDayVamp[param1] = false;
return ITEMDRAW_DISABLED;
}
else
{
return ITEMDRAW_DEFAULT;
}

else if (StrEqual(item, "pigman"))
{
g_bCommandUsedDayPig[param1] = true;
PrecacheModel("models/player/dean/heister_pig.mdl");
SetEntityModel(param1, "models/player/dean/heister_pig.mdl");
g_bCommandUsedDayAdmDev[param1] = false;
g_bCommandUsedDayModHit[param1] = false;
g_bCommandUsedDayAlien[param1] = false;
g_bCommandUsedDaySkull[param1] = false;
g_bCommandUsedDayVamp[param1] = false;
return ITEMDRAW_DISABLED;
}
else
{
return ITEMDRAW_DEFAULT;
}

else if (StrEqual(item, "alien"))
{
g_bCommandUsedDayAlien[param1] = true;
PrecacheModel("models/player/dean/heister_alien.mdl");
SetEntityModel(param1, "models/player/dean/alien.mdl");
g_bCommandUsedDayAdmDev[param1] = false;
g_bCommandUsedDayModHit[param1] = false;
g_bCommandUsedDayPig[param1] = false;
g_bCommandUsedDaySkull[param1] = false;
g_bCommandUsedDayVamp[param1] = false;
return ITEMDRAW_DISABLED;
}
else
{
return ITEMDRAW_DEFAULT;
}

else if (StrEqual(item, "skullman"))
{
g_bCommandUsedDaySkull[param1] = true;
PrecacheModel("models/player/dean/heister_skull.mdl");
SetEntityModel(param1, "models/player/dean/skull.mdl");
g_bCommandUsedDayAdmDev[param1] = false;
g_bCommandUsedDayModHit[param1] = false;
g_bCommandUsedDayAlien[param1] = false;
g_bCommandUsedDayPig[param1] = false;
g_bCommandUsedDayVamp[param1] = false;
return ITEMDRAW_DISABLED;
}
else
{
return ITEMDRAW_DEFAULT;
}

else if (StrEqual(item, "vampman"))
{
g_bCommandUsedDayVamp[param1] = true;
PrecacheModel("models/player/dean/heister_vamp.mdl");
SetEntityModel(param1, "models/player/dean/heister_vamp.mdl");
g_bCommandUsedDayAdmDev[param1] = false;
g_bCommandUsedDayModHit[param1] = false;
g_bCommandUsedDayAlien[param1] = false;
g_bCommandUsedDayPig[param1] = false;
g_bCommandUsedDaySkull[param1] = false;
return ITEMDRAW_DISABLED;
}
else
{
return ITEMDRAW_DEFAULT;
}

}
//}

case MenuAction_End:
{
//param1 is MenuEnd reason, if canceled param2 is MenuCancel reason
CloseHandle(menu);

}

}
return 0;
}



Compile Errors :

//// skins-menu.sp
//
// D:\The Entire BB 2.0\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo\addons\sourcemod\scripting\skins-menu.sp(32) : warning 217: loose indentation
// D:\The Entire BB 2.0\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo\addons\sourcemod\scripting\skins-menu.sp(54) : error 017: undefined symbol "g_bCommandUsedDayModHit"
// D:\The Entire BB 2.0\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo\addons\sourcemod\scripting\skins-menu.sp(54) : warning 215: expression has no effect
// D:\The Entire BB 2.0\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo\addons\sourcemod\scripting\skins-menu.sp(54) : error 001: expected token: ";", but found "]"
// D:\The Entire BB 2.0\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo\addons\sourcemod\scripting\skins-menu.sp(54) : error 029: invalid expression, assumed zero
// D:\The Entire BB 2.0\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo\addons\sourcemod\scripting\skins-menu.sp(54) : fatal error 190: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
//
// Compilation Time: 0.23 sec
// ----------------------------------------

Press enter to exit ...
Solaris15 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 06-17-2019 , 03:43   Re: Skins-Menu errors
Reply With Quote #2

where did you find this plugin?
__________________
8guawong is offline
Solaris15
Junior Member
Join Date: Jun 2019
Location: Romania
Old 06-17-2019 , 05:23   Re: Skins-Menu errors
Reply With Quote #3

I found this plugin here in alliedmodders.
Here is a link :
https://forums.alliedmods.net/showthread.php?t=291159
Solaris15 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 06-17-2019 , 12:09   Re: Skins-Menu errors
Reply With Quote #4

Quote:
Originally Posted by Solaris15 View Post
I found this plugin here in alliedmodders.
Here is a link :
https://forums.alliedmods.net/showthread.php?t=291159
that is not the full source of the plugin
maybe it was decompiled not sure
__________________
8guawong is offline
Solaris15
Junior Member
Join Date: Jun 2019
Location: Romania
Old 06-17-2019 , 12:12   Re: Skins-Menu errors
Reply With Quote #5

Ah ok
Solaris15 is offline
Reply



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 17:45.


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