Auto spawn
#5

As he said, you must use default, its like
PHP код:
switch(x)
{
    case 
y//x=y
    
default: //x=anything else
}
//equivalent code:
if(x=y//code
else //code 
PHP код:
ProcessSpawn(playerid)
{
    new 
skin Player[playerid][Skin];
    switch (
skin)
    {
        case 
280284285286306307309//Cop
        
{
                
gTeam[playerid] = TEAM_COP;
                
SetPlayerToTeamColour(playerid);
                 
SetPlayerTeam(playerid,1);
                new 
rand random(sizeof(RandomCopSpawns));
                
SetSpawnInfo(playeridGetPlayerTeam(playerid), Player[playerid][Skin],  RandomCopSpawns[rand][0],RandomCopSpawns[rand][1],RandomCopSpawns[rand][2], 270.0000000000);
                
                
TogglePlayerSpectating(playeridfalse);
        }
        default:
        {
        
gTeam[playerid] = TEAM_CIV;
        
SetPlayerToTeamColour(playerid);
        
SetPlayerTeam(playerid,0);
        new 
rand random(sizeof(RandomSpawnsLosSantos));
        
SetSpawnInfo(playeridGetPlayerTeam(playerid), Player[playerid][Skin], RandomSpawnsLosSantos[rand][0],RandomSpawnsLosSantos[rand][1],RandomSpawnsLosSantos[rand][2], 270.0000000000);
        
TogglePlayerSpectating(playeridfalse);
        }
    }
    return 
1;

Reply


Messages In This Thread
Auto spawn - by KinderClans - 03.09.2018, 14:23
Re: Auto spawn - by Calisthenics - 03.09.2018, 14:32
Re: Auto spawn - by KinderClans - 03.09.2018, 15:00
Re: Auto spawn - by Calisthenics - 03.09.2018, 15:09
Re: Auto spawn - by Shinja - 03.09.2018, 15:34
Re: Auto spawn - by KinderClans - 04.09.2018, 12:41
Re: Auto spawn - by KinderClans - 05.09.2018, 13:27

Forum Jump:


Users browsing this thread: 2 Guest(s)