Posts: 37
Threads: 8
Joined: Feb 2008
Reputation:
0
I want to create private functions
an example:
A command usable only by people written in the file List.ini
how do I read the names from the file ?
thanks
Posts: 37
Threads: 8
Joined: Feb 2008
Reputation:
0
this is for definited name but if i have the file List.ini
with:
Player1
Player2
how i do to check if the player who wrote is the Player1 or Player2 ?
With GetPlayerName(playerid,Name,24); i have the name but how to check if it is in the List.ini ?
Sorry for my bad english.
Posts: 37
Threads: 8
Joined: Feb 2008
Reputation:
0
i tried :
if(strcmp(cmd, "/conferma", true) == 0) {
new
name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
if(dini_SeekValue("List.ini", name)) {
SendClientMessage(playerid, COLOR_WHITE, " Found");
} else {
SendClientMessage(playerid, COLOR_WHITE, " Not Found");
}
return 1;
}
but with every nick it says not found !!
Posts: 2,856
Threads: 6
Joined: Jun 2007
Reputation:
0
Yes there was an mistake, it always return found, I fixed it in my last post
The only reason why it always returnd a fail is that it couldnt find the file
Check again if the directory / filename is correct
Posts: 37
Threads: 8
Joined: Feb 2008
Reputation:
0
still problem, I know that I create problems useless xD