How would I make them spawn after setting the team? - 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: How would I make them spawn after setting the team? (
/showthread.php?tid=453085)
How would I make them spawn after setting the team? -
iiFarrow - 23.07.2013
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.
Re: How would I make them spawn after setting the team? -
PrinceKumar - 23.07.2013
Can u explain ur question briefly
Re: How would I make them spawn after setting the team? -
Jochemd - 23.07.2013
You're currently returning 0 in OnPlayerRequestClass. If you want them to spawn, return 1.
Re: How would I make them spawn after setting the team? -
iiFarrow - 23.07.2013
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'.
Re: How would I make them spawn after setting the team? -
ConnorHunter - 23.07.2013
Код:
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?
Re: How would I make them spawn after setting the team? -
iiFarrow - 23.07.2013
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.