09.11.2011, 11:26
But what will happen
i make this but didn't load
PHP код:
public OnFilterScriptInit()
{
new string[64]; // Create the string to store the read text in
new File:example = fopen("MapIcon.txt", io_read); // Open the file
fread(example, string); // Fread from the file and store what's read in 'string'
fclose(example); // Close the file
printf("%s",string); // Print what was read
return 1;
}
public OnPlayerConnect(playerid)
{
new string[64]; // Create the string to store the read text in
new File:example = fopen("MapIcon.txt", io_read); // Open the file
while(fread(example, string)) //reads the file line-by-line
{
if(strcmp(string, "SetPlayerMapIcon", true) == 0) //if any of the lines in the file say "Ban" the system will ban the player
{
SetPlayerMapIcon(playerid);
}
}
fclose(example);
return 1;
}