Nach Tod im DM spawnen

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo habe ein kleines Problem mit meinem DM System.


    Und zwar wenn man im DM stirbt soll man im DM wieder spawnen.


    So wäre es wenn man das Minigun DM betritt.



    SetPlayerVirtualWorld(playerid,MGDM);
    ResetPlayerWeapons(playerid);
    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s hat das Minigun-DM betreten!", pname);
    SetPVarInt(playerid,"indm",1);
    SendClientMessageToAll(0xFFA300FF, string);
    switch(random(5))
    {
    case 0:SetPlayerPos(playerid,2795.8066,-2427.3057,13.6317);
    case 1:SetPlayerPos(playerid,2770.7974,-2379.2202,13.6328);
    case 2:SetPlayerPos(playerid,2794.6824,-2464.0898,13.6320);
    case 3:SetPlayerPos(playerid,2717.3525,-2514.5615,17.3672);
    case 4:SetPlayerPos(playerid,2717.1563,-2490.1653,13.6509);
    }
    GameTextForPlayer(playerid,"~r~Come on fighting! All versus All.",4000,3);
    SendClientMessage(playerid,0x00FF32FF,"Willkommen im Minigun-Deathmatch!","Welcome in the minigun Deathmatch");
    SendClientMessage(playerid, 0xFFFFFFFF, "Nutze /exitdm um das Deathmatch zu verlassen! ");
    GivePlayerWeapon(playerid,38,5000);


    Habe es schon mit 'ner Variable probiert aber es klappt nicht so richtig.


    Jemand 'ne Idee?


    Mit freundlichen Grüßen


    Kinq.

    • Offizieller Beitrag

    Ich kenne dein System zwar nicht aber mal schauen.
    Unter OnPlayerSpawn

    if(GetPVarInt(playerid,"indm") == 1) {
    SetPlayerVirtualWorld(playerid,MGDM);
    ResetPlayerWeapons(playerid);
    SetPVarInt(playerid,"indm",1);
    switch(random(5))
    {
    case 0:SetPlayerPos(playerid,2795.8066,-2427.3057,13.6317);
    case 1:SetPlayerPos(playerid,2770.7974,-2379.2202,13.6328);
    case 2:SetPlayerPos(playerid,2794.6824,-2464.0898,13.6320);
    case 3:SetPlayerPos(playerid,2717.3525,-2514.5615,17.3672);
    case 4:SetPlayerPos(playerid,2717.1563,-2490.1653,13.6509);
    }
    GivePlayerWeapon(playerid,38,5000);
    }

  • if(RLDMz[playerid]==1)
    {
    SetPlayerVirtualWorld(playerid,RLDM);
    ResetPlayerWeapons(playerid);
    SetPVarInt(playerid,"indm",1);
    RLDMz[playerid]=1;
    switch(random(10))
    {
    case 0:SetPlayerPos(playerid,781.8991,837.5376,5.8464);
    case 1:SetPlayerPos(playerid,681.0347,972.9415,-12.7109);
    case 2:SetPlayerPos(playerid,521.8394,968.1456,-23.4744);
    case 3:SetPlayerPos(playerid,463.3968,882.5516,-28.3225);
    case 4:SetPlayerPos(playerid,492.7878,786.3410,-22.1027);
    case 5:SetPlayerPos(playerid,622.3457,748.0591,-13.4451);
    case 6:SetPlayerPos(playerid,671.4337,729.3242,-4.4066);
    case 7:SetPlayerPos(playerid,607.9719,852.9265,-43.0342);
    case 8:SetPlayerPos(playerid,465.4101,882.3282,-28.6025);
    case 9:SetPlayerPos(playerid,682.9614,923.9701,-40.7758);
    }
    }


    Das habe ich ja schon probiert nur er spawnt einfach nicht im DM sondern in der normalen Welt.

  • public OnPlayerSpawn(playerid)
    {
    if(RLDMz[playerid]==1)
    {
    SetPlayerVirtualWorld(playerid,RLDM);
    ResetPlayerWeapons(playerid);
    SetPVarInt(playerid,"indm",1);
    RLDMz[playerid]=1;
    switch(random(10))
    {
    case 0:SetPlayerPos(playerid,781.8991,837.5376,5.8464);
    case 1:SetPlayerPos(playerid,681.0347,972.9415,-12.7109);
    case 2:SetPlayerPos(playerid,521.8394,968.1456,-23.4744);
    case 3:SetPlayerPos(playerid,463.3968,882.5516,-28.3225);
    case 4:SetPlayerPos(playerid,492.7878,786.3410,-22.1027);
    case 5:SetPlayerPos(playerid,622.3457,748.0591,-13.4451);
    case 6:SetPlayerPos(playerid,671.4337,729.3242,-4.4066);
    case 7:SetPlayerPos(playerid,607.9719,852.9265,-43.0342);
    case 8:SetPlayerPos(playerid,465.4101,882.3282,-28.6025);
    case 9:SetPlayerPos(playerid,682.9614,923.9701,-40.7758);
    }
    }


    Steht gleich als erstes oben.

    • Offizieller Beitrag

    if(RLDMz[playerid]==1)
    {
    SetPlayerVirtualWorld(playerid,RLDM);
    ResetPlayerWeapons(playerid);
    SetPVarInt(playerid,"indm",1);
    RLDMz[playerid]=1;
    switch(random(10))
    {
    case 0:SetPlayerPos(playerid,781.8991,837.5376,5.8464);
    case 1:SetPlayerPos(playerid,681.0347,972.9415,-12.7109);
    case 2:SetPlayerPos(playerid,521.8394,968.1456,-23.4744);
    case 3:SetPlayerPos(playerid,463.3968,882.5516,-28.3225);
    case 4:SetPlayerPos(playerid,492.7878,786.3410,-22.1027);
    case 5:SetPlayerPos(playerid,622.3457,748.0591,-13.4451);
    case 6:SetPlayerPos(playerid,671.4337,729.3242,-4.4066);
    case 7:SetPlayerPos(playerid,607.9719,852.9265,-43.0342);
    case 8:SetPlayerPos(playerid,465.4101,882.3282,-28.6025);
    case 9:SetPlayerPos(playerid,682.9614,923.9701,-40.7758);
    }
    } else {
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);


    }


    Versuch es mal so.