Event Death Bug
#1

PHP код:
CMD:mini(playerid,params[])
{
    if (
Mini[playerid] == 0)
    {
    
GameTextForPlayer(playerid"~r~MINIGUN DM!"20003);
    
SendClientMessage(playeridCOLOR_RED"** Welcome to MINIGUN DM! type {00FF00} /leavemini{ffcc00} to leave the event" );
    
GetPlayerPos(playeridxpos,ypos,zpos);
    switch(
random(4))
{
  case 
0:
  {
   
SetPlayerPos(playerid,2604.4246,2726.2517,23.8222);
   
SendClientMessage(playerid,COLOR_RED,"You spawned at Sky Road (/skroad)");
  }
  case 
1:
  {
   
SetPlayerPos(playerid,2597.5359,2780.0967,23.8222);
   
SendClientMessage(playerid,COLOR_RED,"You spawned at aa. Old Airport (/aa)");
  }
  case 
2:
  {
   
SetPlayerPos(playerid,2608.2749,2731.7131,36.5386);
   
SendClientMessage(playerid,COLOR_RED,"You spawned at San Fierro (/sf)");
  }
  case 
3:
  {
   
SetPlayerPos(playerid,2643.5828,2776.2068,23.8222);
   
SendClientMessage(playerid,COLOR_RED,"You spawned at Los Santos (/ls)");
  }
}
    
SetPlayerVirtualWorld(playerid1);
    
SetCameraBehindPlayer(playerid);
    
SetPlayerTeam(playeridplayerid);
    
ResetPlayerWeapons(playerid);
    
SetPlayerHealth(playerid100.0);
    
Mini[playerid] = 1;
     }
    if (
IsPlayerInAnyVehicle(playerid))
    {
     
RemovePlayerFromVehicle(playerid);
    }
    
GivePlayerWeapon(playerid3899999);
    new 
pname[MAX_PLAYER_NAME]; 
     
GetPlayerName(playeridpnamesizeof(pname));
      
format(stringtelesizeof(stringtele), "{FFFFFF}%s{6F94CC} has joined a Mini Gun Event!! using {5AD145}(/Mini){E9FA1D}"pname);
       
SendClientMessageToAll(COLOR_YELLOWstringtele); 
    return 
1;

when a player dies he spawns at my random spawn location but in the same world as the event and he can't spawn in world 0 on death how to fix this?
Reply
#2

pawn Код:
CMD:mini(playerid,params[])
{
    if (Mini[playerid] == 0)
    {
    GameTextForPlayer(playerid, "~r~MINIGUN DM!", 2000, 3);
    SendClientMessage(playerid, COLOR_RED, "** Welcome to MINIGUN DM! type {00FF00} /leavemini{ffcc00} to leave the event" );
    GetPlayerPos(playerid, xpos,ypos,zpos);
    switch(random(4))
{
  case 0:
  {
   SetPlayerPos(playerid,2604.4246,2726.2517,23.8222);
   SendClientMessage(playerid,COLOR_RED,"You spawned at Sky Road (/skroad)");
   SetPlayerVirtualWorld(playerid, //putvirtualworldhere); ??
  }
  case 1:
  {
   SetPlayerPos(playerid,2597.5359,2780.0967,23.8222);
   SendClientMessage(playerid,COLOR_RED,"You spawned at aa. Old Airport (/aa)");
   SetPlayerVirtualWorld(playerid, //putvirtualworldhere); ??
  }
  case 2:
  {
   SetPlayerPos(playerid,2608.2749,2731.7131,36.5386);
   SendClientMessage(playerid,COLOR_RED,"You spawned at San Fierro (/sf)");
   SetPlayerVirtualWorld(playerid, //putvirtualworldhere); ??
  }
  case 3:
  {
   SetPlayerPos(playerid,2643.5828,2776.2068,23.8222);
   SendClientMessage(playerid,COLOR_RED,"You spawned at Los Santos (/ls)");
   SetPlayerVirtualWorld(playerid, //putvirtualworldhere); ??
  }
}
Reply
#3

that worked for spawning back in virtual world 0 but can you put it so they can spawn back in the same event instead of out? cause i already have a /leave command that works 100% and when your outside the dm whether 0 0r 1 you can't go back with /mini :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)