how to use this stock
#1

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?
Reply
#2

bump
Reply
#3

This makes absolutely no sense. What are you trying to do anyway?
Reply
#4

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
Reply
#5

please help
Reply
#6

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 >3PlayerCount 0;
    switch(
PlayerCount)
    {
        case 
0:SetPlayerPos(playerid,x,y,z);
        case 
1:SetPlayerPos(playerid,x,y,z);
        case 
2:SetPlayerPos(playerid,x,y,z);
    }

Reply
#7

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
Reply
#8

anyway else to do it then?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)