Posts: 31
Threads: 14
Joined: Oct 2018
Reputation:
0
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 ?
Posts: 214
Threads: 31
Joined: Oct 2018
Reputation:
0
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
Posts: 31
Threads: 14
Joined: Oct 2018
Reputation:
0
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
Posts: 214
Threads: 31
Joined: Oct 2018
Reputation:
0
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;
}
Posts: 31
Threads: 14
Joined: Oct 2018
Reputation:
0
how about classes
classes responsed to choosing team dialogs