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)
+--- Thread: Help? (
/showthread.php?tid=470070)
Help? -
eblood1 - 16.10.2013
when a player die i want them to tele back to their place till they /leave the /team Help?
i want them always when they die to tele back to the place. till they /leave
Re: Help? -
verlaj - 16.10.2013
What are you trying to say ? you want them to tele back to the place where they were last spammed or a team base ?
please give us a brief info
Re: Help? -
eblood1 - 16.10.2013
Quote:
Originally Posted by verlaj
What are you trying to say ? you want them to tele back to the place where they were last spammed or a team base ?
please give us a brief info
|
a team base i want them to spawn there till they type /leave when u type /team there is 4 teams yellow, green , purple, red and blue
Re: Help? -
verlaj - 16.10.2013
then you should first check for their teams, if its grove for example.. then use a function called, new TeamSpawn[MAX_PLAYERS]; then on player death, if(TeamSpawn[playerid] == 1) then make him spawn at your coordinates or if they type /leave then set TeamSpawn[playerid] = 0;, it would make him not to spawn where he wants to, you gotta figure out everything bro.
here is an example
pawn Код:
new TeamSpawn[MAX_PLAYERS];
//Under onplayerspawn
GetPlayerTeam//self understandable
TeamSpawn[playerid] = 1;
//then under on player death
if(TeamSpawn[playerid] == 1)
{
SetPlayerPos //and your coordinates
return 1;
}
else
//your other coordinates
//cmds of zcmd
CMD:leave(playerid,params[])
{
teamspawn[playerid] = 0;
return 1;
}
Re: Help? -
eblood1 - 16.10.2013
Quote:
Originally Posted by verlaj
then you should first check for their teams, if its grove for example.. then use a function called, new TeamSpawn[MAX_PLAYERS]; then on player death, if(TeamSpawn[playerid] == 1) then make him spawn at your coordinates or if they type /leave then set TeamSpawn[playerid] = 0;, it would make him not to spawn where he wants to, you gotta figure out everything bro.
here is an example
pawn Код:
new TeamSpawn[MAX_PLAYERS];
//Under onplayerspawn GetPlayerTeam//self understandable TeamSpawn[playerid] = 1;
//then under on player death
if(TeamSpawn[playerid] == 1) { SetPlayerPos //and your coordinates return 1; } else //your other coordinates
//cmds of zcmd
CMD:leave(playerid,params[]) { teamspawn[playerid] = 0; return 1; }
|
ok thanks