BANNED
Join Date: Sep 2010
Location: pico pal q lee
|
09-29-2010
, 19:11
Re: [ES][ZP] Flashlight Colours
|
#10
|
Te lo doy enterito...
Creamos una variable
PHP Code:
new g_fla[33][3]
Ahora ve a // Custom Flashlight
Busca esta parte
PHP Code:
// Flashlight write_byte(TE_DLIGHT) // TE id engfunc(EngFunc_WriteCoord, destoriginF[0]) // x engfunc(EngFunc_WriteCoord, destoriginF[1]) // y engfunc(EngFunc_WriteCoord, destoriginF[2]) // z write_byte(get_pcvar_num(cvar_flashsize)) // radius write_byte(get_pcvar_num(cvar_flashcolor[0])) // r write_byte(get_pcvar_num(cvar_flashcolor[1])) // g write_byte(get_pcvar_num(cvar_flashcolor[2])) // b write_byte(3) // life write_byte(0) // decay rate message_end()
Y la reemplazas por
PHP Code:
// Flashlight write_byte(TE_DLIGHT) // TE id engfunc(EngFunc_WriteCoord, destoriginF[0]) // x engfunc(EngFunc_WriteCoord, destoriginF[1]) // y engfunc(EngFunc_WriteCoord, destoriginF[2]) // z write_byte(get_pcvar_num(cvar_flashsize)) // radius write_byte(g_fla[ID_FLASH][0]) // r write_byte(g_fla[ID_FLASH][1]) // g write_byte(g_fla[ID_FLASH][2]) // b write_byte(3) // life write_byte(0) // decay rate message_end()
Al final del plugin o donde tu quieras pones:
PHP Code:
public show_menu_fla(id) { new menu = menu_create("\rElige el Color de tu Linterna", "menu_fla") menu_additem(menu, "\yRojo", "1", 0) menu_additem(menu, "\yVerde", "2", 0) menu_additem(menu, "\yAzul", "3", 0) menu_additem(menu, "\yAmarillo", "4", 0) menu_additem(menu, "\yCeleste", "5", 0) menu_additem(menu, "\yPurpura", "6", 0) menu_additem(menu, "\yBlanco", "7", 0)
menu_setprop(menu, MPROP_EXITNAME, "\ySalir") menu_display(id, menu, 0) }
// menu flashlight public menu_fla(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64], access, callback menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback) switch(str_to_num(data)) { case 1: g_fla[id] = { 255, 0, 0 },show_menu_fla(id) case 2: g_fla[id] = { 0, 255, 0 },show_menu_fla(id) case 3: g_fla[id] = { 0, 0, 255 },show_menu_fla(id) case 4: g_fla[id] = { 255, 255, 0 },show_menu_fla(id) case 5: g_fla[id] = { 0, 255, 255 },show_menu_fla(id) case 6: g_fla[id] = { 255, 0, 255 },show_menu_fla(id) case 7: g_fla[id] = { 255, 255, 255 },show_menu_fla(id) } menu_destroy(menu) return PLUGIN_HANDLED }
|
|