When text-draw is clicked not changing to next player
#1

All the other things are working. expect this

PHP код:
 if(playertextid == _TD_see_player[playerid][3]) // LEFT
        
{
            for(new 
GPVI(playerid"see_playerid"); GPVI(playerid"see_playerid"); i--)
            {
                if(
IsPlayerConnected(i) && GPVI(i"pld_loginned"))
                {
                        
SPVI(playerid"see_playerid"i);
                        
updateSeeTextDraws(playerid1);
                        break;
                }
            }
        }
        else if(
playertextid == _TD_see_player[playerid][4]) // RIGHT
        
{
            for(new 
GPVI(playerid"see_playerid"); GPVI(playerid"see_playerid"); i++)
            {
                if(
IsPlayerConnected(i) && GPVI(i"pld_loginned"))
                {
                        
SPVI(playerid"see_playerid"i);
                        
updateSeeTextDraws(playerid1);
                        break;
                }
            }
        } 
Reply
#2

if(i == 0) i = MAX_PLAYERS+1; <--- ? what are you trying to do with this?
use PVars or make player's global variable which will detect player's current spectating ID.

for example when player goes in spec, use SetPVarInt(playerid,"Spectating",targetid);
and than you can use PlayerSpectatePlayer(playerid,GetPVarInt(playerid, "Spectating")+1, SetPVarInt(playerid,"Spectating",GetPVarInt(player id,"Spectating")+1);
Reply
#3

How can i reconfig the above code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)