Tessék, remélem mûködik
#define FILTERSCRIPT
#include <a_samp>
new PlayersNColors[][] = {
\"Szabyxxx\",\"0x15ff00AA\",
\"1ST_Chr\",\"0x0000ffAA\",
\"Viszkisrablo\",\"0xff0000AA\"
};
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" nevek\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
for(new i; i < sizeof(PlayersNColors);i++)
{
if(!strcmp(pName,PlayersNColors,true))
{
SetPlayerColor(playerid,PlayersNColors);
}
}
return 1;
}
E:
new nev[MAX_PLAYER_NAME];
if (strfind(nev, \"Szabyxxx\", true))
{
SetPlayerColor(playerid,0xff0000AA);
}
Ez nem jó, a játékos nevét még le is kell kérni.