How would I make them spawn after setting the team?
#1

Hello everyone, how would I go about spawning the player after setting the teams?

Here's my current code:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 0)
    {
        SendClientMessage(playerid, Colour_White, "Class Test 1");
        SetPlayerTeam(playerid, 1);
        SetPlayerColor(playerid, 0x1B67E0FF);
    } else if(classid == 1) {
        SendClientMessage(playerid, Colour_White, "Class Test 2");
        SetPlayerTeam(playerid, 2);
    } else {
        SendClientMessage(playerid, Colour_White, "Class Test 1");
        SetPlayerTeam(playerid, 1);
    }
    return 0;
}

public OnPlayerRequestSpawn(playerid)
{
    SendClientMessage(playerid, Colour_White, "Spawn Button Test");
    return 1;
}
All thanks appreciated, Farrow.
Reply
#2

Can u explain ur question briefly
Reply
#3

You're currently returning 0 in OnPlayerRequestClass. If you want them to spawn, return 1.
Reply
#4

Quote:
Originally Posted by PrinceKumar
Посмотреть сообщение
Can u explain ur question briefly
Well, where do I go now after setting the class on connect. I don't know how to spawn the player after they have clicked 'Spawn'.
Reply
#5

Код:
if(classid == 0)
    {
        SendClientMessage(playerid, Colour_White, "Class Test 1");
        SetPlayerTeam(playerid, 1);
        SetPlayerColor(playerid, 0x1B67E0FF);
	SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
	SpawnPlayer(playerid);
    }
Is that what you meant?
Reply
#6

Quote:
Originally Posted by ConnorHunter
Посмотреть сообщение
Код:
if(classid == 0)
    {
        SendClientMessage(playerid, Colour_White, "Class Test 1");
        SetPlayerTeam(playerid, 1);
        SetPlayerColor(playerid, 0x1B67E0FF);
	SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
	SpawnPlayer(playerid);
    }
Is that what you meant?
I've got it now sorry, thanks anyways. For some reason my last post stating this was removed for bumping a thread, hope that doesn't happen again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)