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

basebuilder 5.4 need


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
M3rouane
New Member
Join Date: Apr 2023
Location: Netherlands
Old 04-22-2023 , 01:53   basebuilder 5.4 need
Reply With Quote #1

Hi, after 10 years away from PC due to working.
I lost all of my plugins of basebuilder 5.4 with a color menu exported from 6.5 version
So, if someone can help me with it. (In 2013, when i did i just edited natives and lines for do work it), but i lost all knowledge x)
Please don't say **use 6.5 better**

/colors = Colors menu
Attached Files
File Type: sma Get Plugin or Get Source (basebuilder54.sma - 74 views - 51.7 KB)
M3rouane is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 04-25-2023 , 07:59   Re: basebuilder 5.4 need
Reply With Quote #2

You don't need to export anything from 6.5, it has a lot of lines of code so probably no one is going to do that boring stuff for you.
You can easily do it by yourself:
Code:
new const g_szColors[][] = 
{
	"255.0 0.0 0.0",
	"0.0 0.0 255.0",
	"0.0 255.0 0.0",
	"255.0 255.0 255.0",
	"255.0 69.0 0.0",
	"255.0 28.0 174.0",
	"255.0 255.0 0.0"
}

new g_iGrabColor[33]

public GrabColorMenu(id)
{ 
	new g_iMenuGrab = menu_create("\yChoose your Grab Color:\w", "HandleGrabColorMenu")
	menu_additem(g_iMenuGrab, "RED", "1")
	menu_additem(g_iMenuGrab, "BLUE", "2")
	menu_additem(g_iMenuGrab, "GREEN", "3")
	menu_additem(g_iMenuGrab, "WHITE", "4")
	menu_additem(g_iMenuGrab, "ORANGE", "5")
	menu_additem(g_iMenuGrab, "PINK", "6")
	menu_additem(g_iMenuGrab, "YELLOW", "7")
	menu_setprop(g_iMenuGrab, MPROP_EXIT, MEXIT_ALL)
	menu_display(id, g_iMenuGrab, 0)
} 

public HandleGrabColorMenu(id, iMenu, iItem)
{ 
	if(is_user_connected(id) && iItem != MENU_EXIT)
	{
		new szKey[1], _Trash
		menu_item_getinfo(iMenu, iItem, _Trash, szKey, 1, "", 0, _Trash)
		
		g_iGrabColor[id] = str_to_num(szKey[0]) - 1
	}
	
	return PLUGIN_HANDLED
}

public cmdMoveEnt(id)
{
	(...)
	DispatchKeyValue(ent, "rendercolor", g_szColors[g_iGrabColor[id]])
	(...)
}
__________________
Jhob94 is offline
M3rouane
New Member
Join Date: Apr 2023
Location: Netherlands
Old 04-25-2023 , 18:05   Re: basebuilder 5.4 need
Reply With Quote #3

Quote:
Originally Posted by Jhob94 View Post
You don't need to export anything from 6.5, it has a lot of lines of code so probably no one is going to do that boring stuff for you.
You can easily do it by yourself:
Code:
new const g_szColors[][] = 
{
	"255.0 0.0 0.0",
	"0.0 0.0 255.0",
	"0.0 255.0 0.0",
	"255.0 255.0 255.0",
	"255.0 69.0 0.0",
	"255.0 28.0 174.0",
	"255.0 255.0 0.0"
}

new g_iGrabColor[33]

public GrabColorMenu(id)
{ 
	new g_iMenuGrab = menu_create("\yChoose your Grab Color:\w", "HandleGrabColorMenu")
	menu_additem(g_iMenuGrab, "RED", "1")
	menu_additem(g_iMenuGrab, "BLUE", "2")
	menu_additem(g_iMenuGrab, "GREEN", "3")
	menu_additem(g_iMenuGrab, "WHITE", "4")
	menu_additem(g_iMenuGrab, "ORANGE", "5")
	menu_additem(g_iMenuGrab, "PINK", "6")
	menu_additem(g_iMenuGrab, "YELLOW", "7")
	menu_setprop(g_iMenuGrab, MPROP_EXIT, MEXIT_ALL)
	menu_display(id, g_iMenuGrab, 0)
} 

public HandleGrabColorMenu(id, iMenu, iItem)
{ 
	if(is_user_connected(id) && iItem != MENU_EXIT)
	{
		new szKey[1], _Trash
		menu_item_getinfo(iMenu, iItem, _Trash, szKey, 1, "", 0, _Trash)
		
		g_iGrabColor[id] = str_to_num(szKey[0]) - 1
	}
	
	return PLUGIN_HANDLED
}

public cmdMoveEnt(id)
{
	(...)
	DispatchKeyValue(ent, "rendercolor", g_szColors[g_iGrabColor[id]])
	(...)
}
What should i do now?
Tell me more of what i need to do due to long time away
__________________
A great wise man once said,

Fear leads to anger, anger leads to hate, and hate leads to pain.

Last edited by M3rouane; 04-25-2023 at 18:10.
M3rouane is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 04-26-2023 , 04:29   Re: basebuilder 5.4 need
Reply With Quote #4

You only need to copy and paste
Attached Files
File Type: sma Get Plugin or Get Source (basebuilder54.sma - 45 views - 52.7 KB)
__________________
amirwolf 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 05:29.


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