Script Question - 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)
+--- Thread: Script Question (
/showthread.php?tid=279067)
Script Question -
CWollinger - 25.08.2011
My imagination as an example:
I want: if a player connect and the name of the Player is in a text document in the folder Groups(The folder groups is in the folder sciptfiles) than should the player become a yellw Color
Re: Script Question -
[MG]Dimi - 25.08.2011
You cant make folder Groups inside folder filterscripts. Make Folder Groups inside scriptfiles folder and use any File manager include to check and use files.
AW: Script Question -
CWollinger - 25.08.2011
oh sorry i mean sciptfiles
Re: Script Question -
Kush - 25.08.2011
Quote:
Originally Posted by ******
It sounds like you are trying to get special people without going to all the effort of developing a full user system. While this aim does seem to have advantages you need to remember that in SA:MP anyone can change their name to anything. If you don't have the password protection of a user system anyone can set their name to say "CWollinger", join your server and become yellow (assuming that being yellow is desirable, if not, no-one will do it, not even those listed people).
I would urge you to look in to getting a proper user system (there are plenty already made) and store if the user is yellow or not in their user data.
|
And in relation to ******' post, might I recommend YSI? Not only does it contain a powerful and extensive file writer and reader, it has other useful libraries as well which can make tasks easier.
YSI -
https://sampforum.blast.hk/showthread.php?tid=61548
PHP код:
#define gvar_colors[MAX_PLAYERS];
public OnPlayerConnnect(playerid)
{
if(gvar_colors[playerid] == 1)
{
SetPlayerColor(playerid, 0xFFFF00AA);
}
}
I wouldn't do it this way in particular but, this is a simple example of how it can be done i guess.