Help with DM spawns
#1

So i added like 1 DM with random spawns in the game nicely , I still got some that are in one position with no random spawns how ever i wonder how can i add in the other one cuz im worried it will interfere wit the 69 DM Coordinates here it is

69 script:

Top Script
PHP код:
new Float:DMSpawns[][4] =

    {-
491.3325,3513.3535,10.1867,90.865},
    {-
563.2787,3512.9126,23.5641,267.8248},
    {-
593.4873,3506.6257,11.5412,277.3773},
    {-
611.4570,3523.1394,6.7774,258.9531},
    {-
552.4916,3495.9238,6.3913,91.2295}
}; 
OnPlayerSpawn
PHP код:
        if(InDM[playerid] == 1)// tell the script to respawn only the players that inside DM
    
{
        
SetPlayerInterior(playerid0); // We will set the interior to 0 (
        
SetPlayerVirtualWorld(playerid10); // and we will make the Virtual World in different world, so we wont mix with other players
        
new rand random(sizeof(DMSpawns)); // DM Spawn
        
SetPlayerPos(playeridDMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);//set the player position at DM
        
SetPlayerFacingAngle(playeridDMSpawns[rand][3]); // Also facing Angle
        
GivePlayerWeapon(playerid,38,9999);
    } 
PHP код:
COMMAND:69(playeridparams)
     {
        new 
PlayerName[MAX_PLAYER_NAME];//Player name
        
GetPlayerName(playeridPlayerNamesizeof(PlayerName));
        if(
InDM[playerid] == 0)//if the player is not in DM
        
{//then
            
InDM[playerid] = 1// Now we will set him in DM so he will respawn at DM
            
SendClientMessage(playeridCOLOR_LIGHTBLUE "You have joined /69, to leave type /69 again");//Message to tell him that he joined DM
            
format(Stringsizeof(String), "Server:{FFFFFF}%s(%d) has joined (/69)"PlayerNameplayerid);
            
SendClientMessageToAll(COLOR_LIGHTBLUEString);//Message to tell everyone that he joined DM
            
ResetPlayerWeapons(playerid);
            
SetPlayerInterior(playerid0); // we will set he's interior to 0
            
SetPlayerVirtualWorld(playerid10); // and same here Virtual World to 10
            
new rand random(sizeof(DMSpawns)); // DM Spawn
            
SetPlayerPos(playeridDMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);// set the player position at DM
            
SetPlayerFacingAngle(playeridDMSpawns[rand][3]); // Also facing Angle
            
GivePlayerWeapon(playerid,38,99999);
        }
        else {
//if the player is already in DM, he will leave
            
InDM[playerid] = 0//So now we will set him as not in DM
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"You have left /69 to join again type /69");//We will send him a message to tell him that he left
            
SpawnPlayer(playerid);//We will spawn the player now
            
SetPlayerHealth(playerid100);//set he's health to 100
            
ResetPlayerWeapons(playerid);// and reset he's weapons
            
SetPlayerVirtualWorld(playerid0);//we will set he's virtual world to 0
            
SetPlayerInterior(playerid0);//also interior to 0
        
}
        return 
1;
}

/west with only one position
PHP код:
COMMAND:west(playeridparams)
    {
         
SetPlayerPos(playerid,2245.5874,-8967.5977,11.3574);
         
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcome to Old West Gunfights!");
         
GivePlayerWeapon(playerid,24,500);
         
GivePlayerWeapon(playerid,25,200);
         
GivePlayerWeapon(playerid,33,200);
         
GivePlayerWeapon(playerid,4,0);
         return 
1;
    } 
So if you understood i just want west to be added with random spawns in the same way 69 is added without interfering with its coordinates.
Reply
#2

If I'm not wrong, this is what you want?
PHP код:
COMMAND:west(playeridparams)
     {
        new 
PlayerName[MAX_PLAYER_NAME];//Player name
        
GetPlayerName(playeridPlayerNamesizeof(PlayerName));
        if(
InDM[playerid] == 0)//if the player is not in DM
        
{//then
            
InDM[playerid] = 1// Now we will set him in DM so he will respawn at DM
            
SendClientMessage(playeridCOLOR_LIGHTBLUE "You have joined /west, to leave type /west again");//Message to tell him that he joined DM
            
format(Stringsizeof(String), "Server:{FFFFFF}%s(%d) has joined (/west)"PlayerNameplayerid);
            
SendClientMessageToAll(COLOR_LIGHTBLUEString);//Message to tell everyone that he joined DM
            
ResetPlayerWeapons(playerid);
            
SetPlayerInterior(playerid0); // we will set he's interior to 0
            
SetPlayerVirtualWorld(playerid10); // and same here Virtual World to 10
            
new rand random(sizeof(DMSpawns)); // DM Spawn
            
SetPlayerPos(playerid,2245.5874,-8967.5977,11.3574);
            
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcome to Old West Gunfights!"); 
            
GivePlayerWeapon(playerid,24,500); 
            
GivePlayerWeapon(playerid,25,200); 
            
GivePlayerWeapon(playerid,33,200); 
            
GivePlayerWeapon(playerid,4,0); 
        }
        else {
//if the player is already in DM, he will leave
            
InDM[playerid] = 0//So now we will set him as not in DM
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"You have left /west to join again type /west");//We will send him a message to tell him that he left
            
SpawnPlayer(playerid);//We will spawn the player now
            
SetPlayerHealth(playerid100);//set he's health to 100
            
ResetPlayerWeapons(playerid);// and reset he's weapons
            
SetPlayerVirtualWorld(playerid0);//we will set he's virtual world to 0
            
SetPlayerInterior(playerid0);//also interior to 0
        
}
        return 
1;
}

Reply
#3

Thank you for your help i did it myself again. haha ima rep you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)