how to use this stock - 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: how to use this stock (
/showthread.php?tid=249964)
how to use this stock -
fissekarl - 21.04.2011
pawn Код:
stock Pos(playerid)
{
TogglePlayerControllable(playerid,0);
PlayerCount++;
switch(PlayerCount)
{
case 0:SetPlayerPos(playerid,x,y,z);
case 1:SetPlayerPos(playerid,x,y,z);
case 2:SetPlayerPos(playerid,x,y,z);
}
}
and under ongamemodeinit
pawn Код:
AddPlayerClassEx(TEAM3,1, x,y,z ,0,0,0,0,0,0);
That stock will only work for TEAM3 when they spawn, how to do it?
Re: how to use this stock -
fissekarl - 21.04.2011
bump
Re: how to use this stock -
Vince - 21.04.2011
This makes absolutely no sense. What are you trying to do anyway?
Re: how to use this stock -
fissekarl - 21.04.2011
i want to make when team 3 spawns they get freezed and then I add spawns in that code, so when a player spawns he will use that case, then if another one joins he will get case 1 etc
Re: how to use this stock -
fissekarl - 21.04.2011
please help
Re: how to use this stock -
Sinner - 21.04.2011
I don't get it, once you're past PlayerCount>3 then this stock'll be useless.
Maybe?:
PHP код:
stock Pos(playerid)
{
TogglePlayerControllable(playerid,0);
PlayerCount++;
if(PlayerCount >3) PlayerCount = 0;
switch(PlayerCount)
{
case 0:SetPlayerPos(playerid,x,y,z);
case 1:SetPlayerPos(playerid,x,y,z);
case 2:SetPlayerPos(playerid,x,y,z);
}
}
Re: how to use this stock -
fissekarl - 21.04.2011
I will add many SetPlayerPos, I just want to know how this work for Team 3 when they spawn, when someone is on case 0 spawn then the next one will get on case 1 .. etc
Re: how to use this stock -
fissekarl - 23.04.2011
anyway else to do it then?