Help with script
#3

But what will happen
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(examplestring); // 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(examplestring)) //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;

i make this but didn't load
Reply


Messages In This Thread
Help with script - by boyan96 - 09.11.2011, 11:03
Re: Help with script - by Stigg - 09.11.2011, 11:12
Re: Help with script - by boyan96 - 09.11.2011, 11:26
Re: Help with script - by CyNiC - 09.11.2011, 11:28
Re: Help with script - by boyan96 - 09.11.2011, 11:34
Re : Help with script - by decondelite - 09.11.2011, 16:22

Forum Jump:


Users browsing this thread: 1 Guest(s)