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

Menu scren


  
 
 
Thread Tools Display Modes
Author Message
Tinchoo
Junior Member
Join Date: Dec 2010
Old 01-28-2013 , 19:42   Menu scren
#1

cuando pasas a la segunda lista "mas" se bugea y aparecen .
Foto:
[IMG]http://img841.**************/img841/3426/81952583.png[/IMG]

PHP Code:
#include <amxmodx> 
#include <amxmisc> 


new maxplayers 

public plugin_init() { 
    
register_clcmd("say_team /screen","menu_ban_tin")     
    
maxplayers get_maxplayers(); 
     


public 
menu_ban_tin(id)   
{
    if(!
is_user_adminid ) )
    {
    
client_print(idprint_chat" No eres Administrador Para Abrir El Menu!")
        return 
PLUGIN_HANDLED;
    }
    new 
temp1[32
    new 
temp2[2
    new 
Menu menu_create("\wMenu para sacar fotos a players","handle")   
     
    for (new 
1<= maxplayersi++){ 
        if (
is_user_connected(i)) 
        { 
            
get_user_name(i,temp1,32); 
            
num_to_str(i,temp2,2); 
            
menu_additem(Menutemp1,temp2); 
        } 
    } 
    
menu_display(idMenu0);   


public 
handle(idMenuitem

    if (
item == MENU_EXIT
    { 
        
menu_destroy(Menu
        return 
PLUGIN_HANDLED 
    

     
    new 
iData[6]; 
    new 
iAccess
    new 
iCallback
    new 
iName[64]; 
    
menu_item_getinfo(MenuitemiAccessiData5iName63iCallback
    
    
client_cmd(id"amx_sxe_screen %s"iName);  
    
    return 
PLUGIN_HANDLED 


Last edited by Tinchoo; 01-28-2013 at 19:43.
Tinchoo is offline
ChileScripting
BANNED
Join Date: Jan 2013
Old 01-28-2013 , 21:12   Re: Menu scren
#2

Necesita mas capacidad.
new temp2[4]

Last edited by ChileScripting; 01-29-2013 at 02:42.
ChileScripting is offline
claans
Senior Member
Join Date: Jul 2012
Location: Argentina
Old 01-28-2013 , 23:15   Re: Menu scren
#3

Para que le queres sacar fotos a los players ?

Obtene el maximos de caracter que puede tener un nombre en el c.s y multiplicalo x la cantidad de slot que tenes, y dsp pones

new temp1[ElNumero que te dio ]

sl2
cLAANS.-
__________________
http://amxmodx-es.com/ Allied Modders en español
http://amxmodx-es.com/ Allied Modders in spanish
claans is offline
Send a message via MSN to claans Send a message via Skype™ to claans
LudaGe
Senior Member
Join Date: May 2010
Location: World so cold
Old 01-28-2013 , 23:30   Re: Menu scren
#4

PHP Code:
new temp1[512]  
new 
temp2[512
Ahi no te va a dar problemas.
LudaGe is offline
fearAR
Veteran Member
Join Date: Oct 2010
Old 01-28-2013 , 23:44   Re: Menu scren
#5

¿Que tiene que ver el tamaño de la matriz 'temp1' en referencia a esto?

'temp2' es el problema señores, es obvio que si la longitud de esta variable es 2, cuando llegue a un valor que ocupe 2 caracteres en su equivalente a string ( cadena de caracteres en PAWN ), no va a alcanzar el espacio para guardar el caracter EOS ( End Of String ). Con respecto a la variable 'temp1' no recuerdo si el nombre ocupaba un maximo de caracteres de 32 celdas ( uso celdas 01 ), pero supongo que asi como la tienes esta bien.

PHP Code:
new temp2[2]; 
-------------->
PHP Code:
new temp2[4]; 
-----------------------------------------------------------
-----------------------------------------------------------

PHP Code:
num_to_stritemp2
-------------->
PHP Code:
num_to_stritemp2sizeof temp2 -
Saludos.

PD: No respondan boludeces...
__________________
~~~~ NPC AI ~~~~

[ Pathfinding - OK ]
[ Citizen AI - OK ]
[ Handle Weapons - --- ]

Last edited by fearAR; 01-28-2013 at 23:46.
fearAR is offline
Send a message via MSN to fearAR
 



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 00:10.


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