Death team -
Spawe - 09.11.2018
if I have 2 team in the selection of the dialogue as I do so that when a player of each team dies they go to the rightful place of their team
here the code
PHP код:
if(listitem == 0) //Dragons
{
SetSpawnInfo(playerid, 0, 179, 318.8639,1121.6978,1083.8828,180.1659, 24,99999, 24,99999, 24,99999);
if(gTeam[playerid] == DRAGONS) { SetPlayerTeam(playerid, 179); }
SetPlayerColor(playerid, COLOR_DRAGONS);
SetPlayerSkin(playerid, Dragons[random(3)]);
SetPlayerInterior(playerid, 5);
SetPlayerHealth(playerid, 100);
SpawnPlayer(playerid);
}
if(listitem == 1) //Templarios
{
SetSpawnInfo(playerid, 1, 206, 760.3945,1441.3341,1102.7031,120.5558, 24,99999, 24,99999, 24,99999);
if(gTeam[playerid] == TEMPLARIO) { SetPlayerTeam(playerid, 206); }
SetPlayerColor(playerid, COLOR_TEMPLARIOS);
SetPlayerSkin(playerid, Templarios[random(3)]);
SetPlayerInterior(playerid, 6);
SetPlayerHealth(playerid, 100);
SpawnPlayer(playerid);
}
Re: Death team -
DatGuySleepy - 09.11.2018
You could try this, maybe:
PHP код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == DRAGONS)
{
SetPlayerPos(playerid, 318.8639, 1121.6978, 1083.8828);
SetPlayerFacingAngle(playerid, 180.1659);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerSkin(playerid, Dragons[random(3)]);
GivePlayerWeapon(playerid, 24, 99999);
}
if(gTeam[playerid] == TEMPLARIO)
{
SetPlayerPos(playerid, 760.3945, 1441.3341, 1102.7031);
SetPlayerFacingAngle(playerid, 120.5558);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 6);
SetPlayerSkin(playerid, Templarios[random(3)]);
GivePlayerWeapon(playerid, 24, 99999);
}
return 1;
}
Re: Death team -
Spawe - 09.11.2018
it does not work, I want that when one team eliminates another, it returns to its origin
Re: Death team -
AlfaSufaIndo - 09.11.2018
Try this
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[playerid] == DRAGONS)
{
SetPlayerPos(playerid, 318.8639, 1121.6978, 1083.8828);
SetPlayerFacingAngle(playerid, 180.1659);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerSkin(playerid, Dragons[random(3)]);
GivePlayerWeapon(playerid, 24, 99999);
}
if(gTeam[playerid] == TEMPLARIO)
{
SetPlayerPos(playerid, 760.3945, 1441.3341, 1102.7031);
SetPlayerFacingAngle(playerid, 120.5558);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 6);
SetPlayerSkin(playerid, Templarios[random(3)]);
GivePlayerWeapon(playerid, 24, 99999);
}
return 1;
}
Re: Death team -
Spawe - 09.11.2018
It does not work, when a player of any team dies murdered by another falls into the void
Re: Death team -
AlfaSufaIndo - 10.11.2018
Hmm.. maybe you can try this??
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[playerid] == DRAGONS)
{
SetSpawnInfo(playerid, 0, 179, 318.8639,1121.6978,1083.8828,180.1659, 24,99999, 24,99999, 24,99999);
SpawnPlayer(plyerid);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid, COLOR_DRAGONS);
SetPlayerSkin(playerid, Dragons[random(3)]);
SetPlayerTeam(playerid, 179);
SetPlayerInterior(playerid, 5);
GivePlayerWeapon(playerid, 24, 99999);
}
if(gTeam[playerid] == TEMPLARIO)
{
SetSpawnInfo(playerid, 1, 206, 760.3945,1441.3341,1102.7031,120.5558, 24,99999, 24,99999, 24,99999);
SpawnPlayer(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerTeam(playerid, 206);
SetPlayerColor(playerid, COLOR_TEMPLARIOS);
SetPlayerSkin(playerid, Templarios[random(3)]);
SetPlayerInterior(playerid, 6);
GivePlayerWeapon(playerid, 24, 99999);
}
return 1;
}
Re: Death team -
Spawe - 10.11.2018
It does not work when one team eliminates another falls into a vacuum