SA-MP Forums Archive
[Ajuda] Erro no fs - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Erro no fs (/showthread.php?tid=317983)



[Ajuda] Erro no fs - GTO.DoDo - 13.02.2012

Код:
new 
	pIP[MAX_PLAYERS][16],
	pTime[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
	new 
		playerIP[16],
		playerInteger[2];

	GetPlayerIp(playerid, playerIP, 16);
	playerInteger[0] = gettime() + 2;

	for(new i; i < MAX_PLAYERS; ++i)
	{
		if(pTime[i] && !strcmp(pIP, playerIP) && pTime[i] >= playerInteger[0]) 
		{
			if(++playerInteger[1] == 3) 
				return BanEx(playerid, "FUCK OFF IDIOT, YOU SUCK.");
		}
	}

	strmid(pIP, playerIP, 0, 16);
	return pTime[playerid] = pInteger[0];
}

da varios erros! (+REP para quem solucionar)


Re: [Ajuda] Erro no fs - rjjj - 13.02.2012

Consertei os erros do seu cуdigo :


pawn Код:
new
    pIP[MAX_PLAYERS][16],
    pTime[MAX_PLAYERS];
   

public OnPlayerConnect(playerid)
{
    new
        playerIP[16],
        playerInteger[2];

    GetPlayerIp(playerid, playerIP, 16);
    playerInteger[0] = gettime() + 2;

    for(new i; i < MAX_PLAYERS; ++i)
    {
        if(pTime[i] && !strcmp(pIP[playerid], playerIP) && pTime[i] >= playerInteger[0])
        {
            if(++playerInteger[1] == 3)
                return BanEx(playerid, "FUCK OFF IDIOT, YOU SUCK.");
        }
    }

    strmid(pIP[playerid], playerIP, 0, 16, sizeof(pIP[]));
    return pTime[playerid] = playerInteger[0];
}


Espero ter ajudado .


Re: [Ajuda] Erro no fs - GTO.DoDo - 13.02.2012

vlw vlw +REP