14.04.2015, 22:13
Hello, i'm pretty noob at scripting, many of you may know haha. Anyways, I tried scripting this, but in game it just doesn't work. I compile and there's no errors or warnings, it's just there and not working.
Code:
Code:
Код:
public OnPlayerRequestSpawn(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(gTeam[playerid] == TEAM_CIA)
{
if(strfind(name, "[CIA]", true) != 0)
{
SendClientMessage(playerid,0xFF8000C8,"You are not a member of the Central Intelligence Agency! Choose another class.");
ForceClassSelection(playerid);
return 0;
}
}
if(gTeam[playerid] == TEAM_ED)
{
if(strfind(name, "[ED]", true) != 0)
{
SendClientMessage(playerid,0xFF8000C8,"You are not a member of the Electric Drifters! Choose another class.");
ForceClassSelection(playerid);
return 0;
}
}
return 1;
}


