Problema Player Spectate
#2

Cred ca ai putea sa mai pui un PlayerSpectatePlayer atunci cand playerul isi schimba PlayerState-ul. De exemplu fa o variabila gen: spectargetof[MAX_PLAYERS] si in care ii pui valoarea: idul adminului care a dat spectate pe el. Dupa aceea te foloseste de callbackul OnPlayerStateChange cu conditia:
Код:
if( (oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_DRIVER ) && newstate == PLAYER_STATE_ONFOOT && spectargetof[playerid] != -1) //Aici poti sa combini conditia (poate am cateva greseli)
PlayerSpectatePlayer(spectargetof[playerid],playerid);
Sper ca am fost de ajutor. Bafta cu implementarea, eu ti-am zis in mare cam cum as face eu.
Reply


Messages In This Thread
Problema Player Spectate - by RedGun2015 - 05.08.2017, 12:21
Re: Problema Player Spectate - by 10MIN - 05.08.2017, 14:01
Re: Problema Player Spectate - by RedGun2015 - 05.08.2017, 14:47

Forum Jump:


Users browsing this thread: 1 Guest(s)