Spawn Issue
#1

I'm doing something in which doing instructions for players when they first spawn in the server I've found a method around the forums using PVars heres the code..

PHP код:
public OnPlayerSpawn(playerid
{
    
SetPlayerInterior(playerid0);
    if(
GetTeam{playerid} == CLASS_DRIVER)
    {
     switch(
GetPVarInt(playerid"FirstSpawn"))
        { 
            case 
0:
            {
                new 
Random = ...
                
SetPlayerColor(playeridCOLOR_WHITE); 
                (...)
//Random Spawn
                
SetPVarInt(playerid"FirstSpawn"1); 
                
SendClientMessage(playerid, -1"First Spawn 1.");
            }
            case 
1:
            {
                new 
Random = ....
                
SetPlayerColor(playeridCOLOR_WHITE); 
                (...)
//Random Spawn
                
SendClientMessage(playerid, -1"First Spawn 2."); 
                
SetPVarInt(playerid"FirstSpawn"2);
            }
        }
    }
    return 
1

Heres the thing the first/second case works but after that it doesnt random spawn the player i'm trying to do it in a way the 3 time the player dies it they wont see "First Spawn 2" again i've try putting SetPVarInt(playerid,"FirstSpawn",3); onplayerdeath but it ignores case 1... Please show me what's wrong
Reply
#2

Trying make a case 2..100: I doubt players would be on a server to get 100 death's at once..
Reply
#3

use default:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)