automatically spawning player
#1

Код:
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..
Reply
#2

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

thanks. +rep
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)