SA-MP Forums Archive
SA-MP Wiki Bugged - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SA-MP Wiki Bugged (/showthread.php?tid=184512)



SA-MP Wiki Bugged - Rapgangsta - 20.10.2010

In this page https://sampwiki.blast.hk/wiki/Fread
there is error -

public OnGameModeInit()
{
new string[64]; // Create the string to store the read text in
new File:example = fopen("Startup.txt", io_read); // Open the file
while(fread(example, string)) //reads the file line-by-line
{
if(strcmp(string, "Ban", true) == 0) //if any of the lines in the file say "Ban" the system will ban the player
{
Ban(playerid); //bans the player
}
}
fclose(example);
return 1;
}

must be

public OnPlayerConnect(playerid)
{
new string[64]; // Create the string to store the read text in
new File:example = fopen("Startup.txt", io_read); // Open the file
while(fread(example, string)) //reads the file line-by-line
{
if(strcmp(string, "Ban", true) == 0) //if any of the lines in the file say "Ban" the system will ban the player
{
Ban(playerid); //bans the player
}
}
fclose(example);
return 1;
}


Re: SA-MP Wiki Bugged - Slice - 20.10.2010

There's a lot of faulty/diffuse information on the wiki. :\


Re: SA-MP Wiki Bugged - Karlip - 20.10.2010

Anyone who registers on SA-MP wiki can edit and create pages.

You can fix them also.


Re: SA-MP Wiki Bugged - rbN. - 20.10.2010

Quote:
Originally Posted by Karlip
Посмотреть сообщение
Anyone who registers on SA-MP wiki can edit and create pages.

You can fix them also.
Problem is, I can't register lol..


Re: SA-MP Wiki Bugged - Miguel - 20.10.2010

Registration was closed due to people abusing their powers and posting bad pictures.

Note: I edited that article, check it out.


Respuesta: SA-MP Wiki Bugged - MrDeath537 - 20.10.2010

Some examples can be bad (like the Fread and OnGameModeInit) but they are made for show you how does the function works.