Deathmatch Spawn BUG
#1

when i in DM such as /fdm /war /mini
and i got kill by someone
but im not spawning,i just spawn in other Virtual World

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     SendDeathMessage(killerid, playerid, reason);
	if(IsBeingSpeced[playerid] == 1)
    {
        for (new i = 0; i < MAX_PLAYERS; i++)
        {
            if(spectatorid[i] == playerid)
            {
				format(strg, sizeof(strg), ""STEELBLUE"- AS - {%06x}%s(%d) "STEELBLUE"died while you were spectating, you may resume spectating by using /spec again.", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid);
				SendClientMessage(i, -1, strg);
                TogglePlayerSpectating(i,false);
            }
        }
    }
    GameTextForPlayer(playerid, "~r~DEAD!", 3000, 3);
    PlayerInfo[playerid][Deaths]++;
    if(killerid != INVALID_PLAYER_ID)
    {
        gTotalKills++;
		switch (gTotalKills)
		{
		    case 100: SendClientMessageToAll(-1, "{FFD700} {008FFB}100{2BD9F8} players have been killed since the server launch!");
		    case 500: SendClientMessageToAll(-1, "{FFD700} {008FFB}500{2BD9F8} players have been killed since the server launch!");
			case 1000: SendClientMessageToAll(-1, "{FFD700} {008FFB}1000{2BD9F8} players have been killed since the server launch!");
		}
        new INI:FILE_SERVER_STATS = INI_Open(ServerStats);
       	INI_SetTag(FILE_SERVER_STATS, "Server_Statistics");
		INI_WriteInt(FILE_SERVER_STATS, "Total_Kills", gTotalKills);
		INI_Close(FILE_SERVER_STATS);

        new str[128];
         //DM
		EXPforDM[killerid] = CreatePlayerTextDraw(killerid, 2.500000, 175.466751, "+1 EXP");
  		PlayerTextDrawLetterSize(killerid, EXPforDM[killerid], 0.449999, 1.600000);
  		PlayerTextDrawAlignment(killerid, EXPforDM[killerid], 1);
  		PlayerTextDrawColor(killerid, EXPforDM[killerid], -5963521);
  		PlayerTextDrawSetShadow(killerid, EXPforDM[killerid], 0);
  		PlayerTextDrawSetOutline(killerid, EXPforDM[killerid], -256);
  		PlayerTextDrawBackgroundColor(killerid, EXPforDM[killerid], 51);
  		PlayerTextDrawFont(killerid, EXPforDM[killerid], 2);
		PlayerTextDrawSetProportional(killerid, EXPforDM[killerid], 1);

  		CashforDM[killerid] = CreatePlayerTextDraw(killerid, 2.500000, 191.644439, "+3000$");
  		PlayerTextDrawLetterSize(killerid, CashforDM[killerid], 0.449999, 1.600000);
  		PlayerTextDrawAlignment(killerid, CashforDM[killerid], 1);
  		PlayerTextDrawColor(killerid, CashforDM[killerid], 16711935);
  		PlayerTextDrawSetShadow(killerid, CashforDM[killerid], 0);
  		PlayerTextDrawSetOutline(killerid, CashforDM[killerid], 0);
		PlayerTextDrawBackgroundColor(killerid, CashforDM[killerid], 51);
  		PlayerTextDrawFont(killerid, CashforDM[killerid], 2);
  		PlayerTextDrawSetProportional(killerid, CashforDM[killerid], 1);
  		PlayerTextDrawShow(killerid, EXPforDM[killerid]);
	    PlayerTextDrawShow(killerid, CashforDM[killerid]);

        PlayerTextDrawShow(killerid, EXPforDM[killerid]);

  		PlayerTextDrawShow(killerid, CashforDM[killerid]);

     	PlayerInfo[killerid][Kills]++;
        SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
        GivePlayerMoney(killerid, 3000);

        for (new i = 0; i < MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i))
            {
                if (PlayerInfo[i][inDM] == 1)
                {
                    format(str, sizeof(str), "%s(%d) killed %s(%d) (%s)", GetName(killerid), killerid, GetName(playerid), playerid, WeaponNames[reason]);
                    SendClientMessage(i, COLOR_VIOLET, str);
    			}
   			}
  		}
  		//SendClientMessageToAll( COLOR_VIOLET, str);
        gDMTD = SetTimerEx("HideDMTextDraw", 2000, false, "i", killerid);
 	}
 	return 1;
}
Reply
#2

can someone help me please?
Reply
#3

Set his virtual world to the correct one ?
SetPlayerVirtualWorld
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)