if..getting correct id...getplayername
#1

Hello..
I'm trying to fix some bug for almost week. A lot of scripters have tried to fix it, but unsuccesful.
Topic: https://sampforum.blast.hk/showthread.php?pid=1204429#pid1204429

I have tested and debugged almost every day with different scripts, same bug all the time.

Here's debug script:
pawn Код:
for(new i=0;i<MAX_PLAYERS;i++)
        {
        if(IsPlayerInAnyVehicle(playerid)) // also with i
            {
            new string[64];
            format(string,sizeof(string),"%d",i);
            SendClientMessageToAll(COLOR_RED,string);
            GetPlayerName(i, uzvaretajs, sizeof(uzvaretajs));
            format(string,sizeof(string),"%s",uzvaretajs);
            SendClientMessageToAll(COLOR_RED,string);
           
            }
        }
uzvaretajs = string for GetPlayerName

Winner should be only one, this is how chat looks:


starting from id 0 (when showing ID 0, server prints out my nick). There was only two players in server (id 0, id 1 - necu), MAX_PLAYERS are set to 40, not 37. When player dies, he spawns somewhere under sea on foot. I can even see those players and they are on foot, not in the car, so if(IsPl.. fails and lets thru all players. In

I can give full gm script to any moderator, just pm me.

EDIT: i tried with PlayerInfo[i][dead] in if(..), same bug.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)