hilfe mit dm

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
  • brauche hilfe mit dms kriege das irndwie nicht hin das die respawnen in dm wenn sie tot sind kann mir pls dabei einer helfen =) hier die codes :


    if(strcmp(cmdtext,"/dm",true)==0)
    {
    SetPlayerPos(playerid,1358.9202,2117.0469,11.0156);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 26, 999999);
    GivePlayerWeapon(playerid, 28, 999999);
    GetPlayerName(playerid,name,24);
    SendClientMessage(playerid, 0xFF0000FF, "**Dm**");
    format(string,sizeof(string),"%s macht jetzt Dm(/dm)",name);
    SendClientMessageToAll(0xAAFF00FF,string);
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.00);
    SetPlayerVirtualWorld(playerid,1);
    return 1;
    }


    if(strcmp(cmdtext,"/dmend",true)==0)
    {
    SetPlayerPos(playerid,2490.9143,-1669.0798,13.3359);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 26, 1000);
    GivePlayerWeapon(playerid, 28, 1000);
    GivePlayerWeapon(playerid, 31, 1000);
    GetPlayerName(playerid,name,24);
    SendClientMessage(playerid, 0xFF0000FF, "**Dm Ende**");
    format(string,sizeof(string),"%s verlässt das Dm(/dmend)",name);
    SendClientMessageToAll(0xAAFF00FF,string);
    SetPlayerVirtualWorld(playerid,0);
    return 1;
    }
    else if(strcmp(cmdtext,"/dm2",true)==0)
    {
    SetPlayerPos(playerid,2605.0562,2706.4333,25.8222);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 38, 999999);
    GetPlayerName(playerid,name,24);
    SendClientMessage(playerid, 0xFF0000FF, "**Minigun Dm**");
    if(deueng==false) format(string,sizeof(string),"%s are now in Minigun Dm(/dm2)",name);


    if(deueng==true) format(string,sizeof(string),"%s macht jetzt Minigun Dm(/dm2)",name);
    SendClientMessageToAll(0xAAFF00FF,string);
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.00);
    SetPlayerVirtualWorld(playerid,2);
    return 1;
    }


    else if(strcmp(cmdtext,"/dm3",true)==0)
    {
    SetPlayerPos(playerid,2217.6121,-1168.7826,25.7266);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 24,999999);
    GivePlayerWeapon(playerid, 31,999999);
    GivePlayerWeapon(playerid, 27,999999);
    GetPlayerName(playerid,name,24);
    SendClientMessage(playerid, 0xFF0000FF, "**Walk Weapon Dm**");
    if(deueng==false) format(string,sizeof(string),"%s are now in Walk Weapon Dm(/dm3)",name);


    if(deueng==true) format(string,sizeof(string),"%s macht jetzt Walk Weapon Dm(/dm3)",name);
    SendClientMessageToAll(0xAAFF00FF,string);
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.00);
    SetPlayerVirtualWorld(playerid,3);
    return 1;
    }

  • Das erste was du machst , du erstellst eine Variable

    new IsPlayerInDm[MAX_PLAYERS];


    bei jedem dm command stellst du die var auf 1 und sobald er das dm verlässt auf 0 , 1 für Wahr und 0 für falsch


    IsPlayerInDm[playerid] = 0;
    IsPlayerInDm[playerid] = 1;


    Bei der Klasse OnPlayerDeath


    if(IsPlayerInDm[playerid] == 1){
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.00);
    SetPlayerVirtualWorld(playerid,1);
    SetPlayerPos(playerid,1358.9202,2117.0469,11.0156); }

    Mfg. BlackFoX_UD_ alias [BFX]Explosion


  • funzt nicht <.< ;(


    hier das was ich jetzt habe :


    if(strcmp(cmdtext,"/dm",true)==0)
    {
    IsPlayerInDm[playerid] = 1;
    SetPlayerPos(playerid,1358.9202,2117.0469,11.0156);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 26, 999999);
    GivePlayerWeapon(playerid, 28, 999999);
    GetPlayerName(playerid,name,24);
    SendClientMessage(playerid, 0xFF0000FF, "**Dm**");
    format(string,sizeof(string),"%s macht jetzt Dm(/dm)",name);
    SendClientMessageToAll(0xAAFF00FF,string);
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.00);
    SetPlayerVirtualWorld(playerid,1);
    return 1;
    }


    if(strcmp(cmdtext,"/dmend",true)==0)
    {
    IsPlayerInDm[playerid] = 0;
    SetPlayerPos(playerid,2490.9143,-1669.0798,13.3359);
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid, 26, 1000);
    GivePlayerWeapon(playerid, 28, 1000);
    GivePlayerWeapon(playerid, 31, 1000);
    SetPlayerArmour(playerid, 0.00);
    GetPlayerName(playerid,name,24);
    SendClientMessage(playerid, 0xFF0000FF, "**Dm Ende**");
    format(string,sizeof(string),"%s verlässt das Dm(/dmend)",name);
    SendClientMessageToAll(0xAAFF00FF,string);
    SetPlayerVirtualWorld(playerid,0);
    return 1;
    }


    und das habe in unter OnPlayerDeath
    if(IsPlayerInDm[playerid] == 1){
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 100.00);
    SetPlayerVirtualWorld(playerid,1);
    SetPlayerPos(playerid,1358.9202,2117.0469,11.0156); }

  • cool thx geht =)=)=) thxxxxx :D :D :D :D :D :D :D :D :D :D :thumbup: :thumbup: :thumbup: :thumbup: :thumbup: :thumbup:


    //edit brauche nochmal hilfe xD wie mache ich das die die im dm sind sich nicht telen können^^??

    Einmal editiert, zuletzt von Nino ()