Help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help (
/showthread.php?tid=131262)
Help -
[WF]Demon - 02.03.2010
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
Re: Help -
aircombat - 02.03.2010
that's automatic , when a player from a team die , he respawns at the team spawns
________
Vaporizer Affiliate Program
Re: Help -
aircombat - 02.03.2010
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
Re: Help -
[WF]Demon - 02.03.2010
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?
Re: Help -
SpiderPork - 02.03.2010
SetSpawnInfo?
Re: Help -
[WF]Demon - 02.03.2010
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?
Re: Help -
Calgon - 02.03.2010
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.