OnPlayerRequestSpawn help
#1

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:
Код:
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;
  }
Reply


Messages In This Thread
OnPlayerRequestSpawn help - by nicholasramdhan - 14.04.2015, 22:13
Re: OnPlayerRequestSpawn help - by fuckingcruse - 15.04.2015, 07:50
Re: OnPlayerRequestSpawn help - by nicholasramdhan - 15.04.2015, 21:14
Re: OnPlayerRequestSpawn help - by Crayder - 15.04.2015, 21:18
Re: OnPlayerRequestSpawn help - by nicholasramdhan - 16.04.2015, 01:19
Re: OnPlayerRequestSpawn help - by Crayder - 16.04.2015, 02:37
Re: OnPlayerRequestSpawn help - by nicholasramdhan - 18.04.2015, 16:31
Re: OnPlayerRequestSpawn help - by Azula - 18.04.2015, 17:27
Re: OnPlayerRequestSpawn help - by Crayder - 18.04.2015, 18:49

Forum Jump:


Users browsing this thread: 1 Guest(s)