SA-MP Forums Archive
Error en el sistema de telйfono. [Timer] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Error en el sistema de telйfono. [Timer] (/showthread.php?tid=613351)



Error en el sistema de telйfono. [Timer] - Colomina37 - 26.07.2016

Buenas, tengo una duda acerca de este cуdigo que me genera dudas. Tras ir testeando funciona, pero "Mobile[Mobile[i]]" da cifras excesivas, la mayoria de bases ZC tienen este problema. Quiйn entiende el problema en este cуdigo, lo ъnico que tiene que hacer es que al que se llama, le llege un aviso cada 5 segundos de que le suena el telйfono. Esto forma parte del timer que se ejecuta cada segundo:


Quote:

if(CellTime[i] > 0)
{
if (CellTime[i] == cchargetime)
{
CellTime[i] = 1;
if(Mobile[Mobile[i]] == i)
{
CallCost[i] = CallCost[i]+callcost;
}
}
CellTime[i]++;
// Celltime, cada 5 segundos sonarб el telйfono.
if (Mobile[Mobile[i]] == INVALID_PLAYER_ID && CellTime[i] == 5)
{
new called[MAX_PLAYER_NAME], string[96];
GetPlayerName(Mobile[i], called, sizeof(called));
format(string, sizeof(string), "* El telйfono de %s esta sonando", called);
ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
}




Re: Error en el sistema de telйfono. [Timer] - bm0z - 26.07.2016

їPero tiene algъn tipo de fallo? Si te devuelve cifras excesivas, es porque te esta devolviendo el valor de INVALID_PLAYER_ID (65535).