#1

Hello i am "kinda" new at scripting and i made a TDM but i need a code or something that when they die in the TDM that they return at their teams spawn point, anyone got a code for this?
Reply back please
Thanks, Cody Beer
Reply
#2

that's automatic , when a player from a team die , he respawns at the team spawns
________
Vaporizer Affiliate Program
Reply
#3

idk that happens to my script xD i scripted the teams and when a player from a team die he respawns at the place where he spawned the first time xD
________
Anal Oops
Reply
#4

none of these helped me here is my commands for the TDM
Код:
	if (strcmp("/tdmg", cmdtext, true, 10) == 0)
	{
	GivePlayerWeapon(playerid, 353, 1000);
	GivePlayerWeapon(playerid, 356, 1000);
	GivePlayerWeapon(playerid, 350, 1000);
	GivePlayerWeapon(playerid, 342, 1000);
	SetPlayerTeam(playerid, 1);
	SetPlayerPos(playerid, 2520.8533, -1677.9012, 15.1480);
	SetPlayerFacingAngle(playerid, 94.3242);
	SetPlayerSkin(playerid, 106);
	SendClientMessage(playerid, COLOR_GROVE, "You went to the TDM On Grove's side!");
	SendClientMessage(playerid, COLOR_GROVE, "Kill Other Gang Members!!!");
	return 1;
	}
	if (strcmp("/tdmb", cmdtext, true, 10) == 0)
	{
	GivePlayerWeapon(playerid, 353, 1000);
	GivePlayerWeapon(playerid, 356, 1000);
	GivePlayerWeapon(playerid, 350, 1000);
	GivePlayerWeapon(playerid, 342, 1000);
	SetPlayerTeam(playerid, 2);
	SetPlayerPos(playerid, 2154.3250, -1803.4918, 13.5567);
	SetPlayerFacingAngle(playerid, 282.9160);
	SetPlayerSkin(playerid, 102);
	SendClientMessage(playerid, COLOR_PURPLE, "You went to the TDM On Balla's side!");
	SendClientMessage(playerid, COLOR_PURPLE, "Kill Other Gang Members!!!");
	return 1;
	}
can anyone do something that will return them to those coordinates?
Reply
#5

SetSpawnInfo?
Reply
#6

ok i added something to my commands and put this in OnPlayerDeath
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  if(DMZone[playerid] == 1)
	SetPlayerPos(playerid, 2520.8533, -1677.9012, 15.1480);
	SetPlayerFacingAngle(playerid, 94.3242);
	return 1;
}
and when i die on that team it doesn't return me back to that position anyone have any fixes to this?
Reply
#7

pawn Код:
new Died[ MAX_PLAYERS ];

public OnPlayerConnect( playerid )
{
    Died[ playerid ] = 0;
    return 1;
}

public OnPlayerDeath( playerid, killerid, reason )
{
    Died[ playerid ] = 1;
    return 1;
}

public OnPlayerSpawn( playerid )
{
    if( Died[ playerid ] == 1 && DMZone[ playerid ] == 1 )
    {
      DMZone[ playerid ] = 0; // Incase you want to unset it.
        SetPlayerPos(playerid, 2520.8533, -1677.9012, 15.1480);
        SetPlayerFacingAngle(playerid, 94.3242);
        Died[ playerid ] = 0;
       
    }
   
    return 1;
}
Just add on to it, instead of pasting my code over all of yours.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)