SA-MP Forums Archive
automatically spawning player - 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: automatically spawning player (/showthread.php?tid=655433)



automatically spawning player - div - 21.06.2018

Код:
public OnPlayerRequestSpawn(playerid)
{

		
		if(gTeam[playerid] == TEAM_CIVILIAN)
		{
		if(pInfo[playerid][pXP] <= 14999)
		return SendClientMessage(playerid, -1, "{FF0000}[ERROR]{FFFFFF} You do not have sufficient XP to join this class.");
		else
		{
		SpawnPlayer(playerid);
		}
		}

It sends me a MESSAGE, but also spawns me, i don't want it to spawn unless i meet the requirement..


Re: automatically spawning player - DerickClark - 21.06.2018

Код:
public OnPlayerRequestSpawn(playerid)
{
        if(gTeam[playerid] == TEAM_CIVILIAN && pInfo[playerid][pXP] <= 14999)
	{
	    SendClientMessage(playerid, -1, "{FF0000}[ERROR]{FFFFFF} You do not have sufficient XP to join this class.");
	    return 0;
	}
	return 1;
}



Re: automatically spawning player - div - 21.06.2018

thanks. +rep