View Single Post
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-29-2010 , 13:02   Re: [ES] El Offtopic va ACA! (con reglas)
#6864

Quote:
Originally Posted by Asdito´^ View Post
PHP Code:
public client_connect(id)
{
    new 
szName[32//
    
get_user_name(idszName31)// 
    
    
ArraySetString(topasoidszName)

seguro el debug te habra tirado index out bounds

Nono, eso esta bien... solo que esta usando una celda de mas, al pedo... pero no esta mal.

Igual ahora que lo veo los parametros que uso en ArrayGetString y ArraySetString estan mal...

Code:
/**  * Returns a string value from an array.  *  * @param which         The array to retrieve the item from.  * @param item          The item to retrieve (zero-based).  * @param output        The variable to store the value in.  * @param size          Character size of the output buffer.  */ native ArrayGetString(Array:which, item, output[], size); /**  * Sets an item's data with that of a local buffer.    * The buffer size must match what the cellsize that the array was created with!  * The item must already exist, use ArrayPushArray to create a new item within the array.  *  * @param which         The array to set the item from within.  * @param item          The item to set (zero-based).  * @param input         The input buffer to store.  */ native ArraySetArray(Array:which, item, const any:input[]);

No se por que en el segundo parametro pusiste la id XD... si no necesitas la id del player para guardar datos dentro de una variable.

Lo que tenes que hacer crear una variable global e ir aumentando esa variable en el client connect. (esa variable seria el parametro "item").
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^