Spawn - 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: Spawn (
/showthread.php?tid=664116)
Spawn -
Mohaowmad - 19.02.2019
Hello
Recently, i made a gamemode with teams with skins and class selection , and i choose a class
& when i die , CJ Will Respawn
i want to respawn as that team & class i chose when i selected them
anyone could help ?
Re: Spawn -
TokicMajstor - 19.02.2019
Load the values of variables you set when player choosed team. If you want me to show you send me your command for choosing teams
Re: Spawn -
Mohaowmad - 19.02.2019
choosing teams are dialogs and they are under OnPlayerRequestClass & Their Responses are spawnplayer and setplayerskin and giveplayerweapons and when i die i will respawn as cj with nothin
Re: Spawn -
TokicMajstor - 19.02.2019
Then do this: make a variable like this new CheckTeam[MAX_PLAYERS] = 0;
Then go to that place where you set his team and skin. For the first team under setting skin do this: CheckTeam[playerid] = 1;
And for another team the same thing but value should be 2.
And then go to onplayerspawn and make this
public OnPlayerSpawn(playerid)
{
if(CheckTeam[playerid] == 1)
{
//put here the thing for team 1 like skin and guns etc.
}
if(CheckTeam[playerid] == 2)
{
//Here put the things for team 2
}
return 1;
}
Re: Spawn -
Mohaowmad - 20.02.2019
how about classes
classes responsed to choosing team dialogs