Iluminenme - 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: Iluminenme (
/showthread.php?tid=588357)
Iluminenme -
xnder - 08.09.2015
Estoy haciendo un sistema de espectear es para admin, ya lo tengo listo, pero quiero agregar que cuando presiona el click izquiero/derecho del mouse cambie a otro jugador.
Ejemplo: estoy especteando al player con el id 5 si presiono click izquierdo q cambie al player con el id 4 у si presiono el click derecho cambie al id 6 y asi sucesivamente.
Pero no tengo idea de como hacerlo. alguien me da una pista por favor. De ante mano gracias.
Re: Iluminenme -
SickAttack - 08.09.2015
Es algo sencillo.
e.g.
pawn Код:
GetNextPlayerID(id)
{
new next_player_id = INVALID_PLAYER_ID;
for(new i = (id + 1), j = GetPlayerPoolSize(); i <= j; i ++)
{
if(!IsPlayerConnected(i)) continue;
next_player_id = i;
break;
}
return next_player_id;
}
Y de ese base sacas lo demas.