Benötige Hilfe mit Selfmade

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
    Ich bin gerade dabei ein Selfmade von einem Kumpel zu editieren.
    Jezzt hab ich ein problem
    Nachdem ich eingeloggt bin spawne ich ganz normal.
    aber wenn ich dann sterbe komm ich in die skin auswwahl und muss eig suchen bis ich den skin der polizei gefunden hab.
    wie änder ich es, dass ich automatisch mit dem fraktionsskin spawne?


    gruss timo

  • public OnPlayerDeath(playerid, killerid, reason)
    {
    TextDrawHideForPlayer(playerid,kmhanzeige);
    TextDrawHideForPlayer(playerid,Speed[playerid]);
    TextDrawHideForPlayer(playerid,Benzinanzeige);
    TextDrawHideForPlayer(playerid,Benzin[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw8);
    TextDrawHideForPlayer(playerid, Textdraw9);
    TextDrawHideForPlayer(playerid, Textdraw10);
    TextDrawHideForPlayer(playerid, Textdraw11);
    TextDrawHideForPlayer(playerid, Textdraw12);
    TextDrawHideForPlayer(playerid, Textdraw13);
    TextDrawHideForPlayer(playerid, Textdraw14);
    TextDrawHideForPlayer(playerid, Textdraw15);
    TextDrawHideForPlayer(playerid, Textdraw16);
    TextDrawHideForPlayer(playerid, Textdraw17);
    TextDrawHideForPlayer(playerid, Textdraw18);
    TextDrawHideForPlayer(playerid, Textdraw19);
    TextDrawHideForPlayer(playerid, Textdraw20);
    TextDrawHideForPlayer(playerid, Textdraw21);
    TextDrawHideForPlayer(playerid, Textdraw22);
    TextDrawHideForPlayer(playerid, Textdraw23);
    TextDrawHideForPlayer(playerid, Textdraw24);
    TextDrawHideForPlayer(playerid, Textdraw25);
    TextDrawHideForPlayer(playerid, Textdraw26);
    TextDrawHideForPlayer(playerid, Textdraw27);
    TextDrawHideForPlayer(playerid, Textdraw28);
    TextDrawHideForPlayer(playerid, Textdraw29);
    TextDrawHideForPlayer(playerid, Textdraw30);
    TextDrawHideForPlayer(playerid, Textdraw31);
    TextDrawHideForPlayer(playerid, Textdraw32);
    TextDrawHideForPlayer(playerid, Textdraw33);
    TextDrawHideForPlayer(playerid, Textdraw34);
    TextDrawHideForPlayer(playerid, Textdraw35);
    TextDrawHideForPlayer(playerid, Textdraw36);
    TextDrawHideForPlayer(playerid, Textdraw37);
    TextDrawHideForPlayer(playerid, Textdraw38);
    TextDrawHideForPlayer(playerid, Textdraw39);
    TextDrawHideForPlayer(playerid, Textdraw40);
    TextDrawHideForPlayer(playerid, Textdraw41);
    TextDrawHideForPlayer(playerid, Textdraw42);
    TextDrawHideForPlayer(playerid, Textdraw43);
    TextDrawHideForPlayer(playerid, Textdraw44);
    TextDrawHideForPlayer(playerid, Textdraw45);
    TextDrawHideForPlayer(playerid, Textdraw46);
    TextDrawHideForPlayer(playerid, Textdraw47);
    TextDrawHideForPlayer(playerid, Textdraw48);
    TextDrawHideForPlayer(playerid, Textdraw49);
    TextDrawHideForPlayer(playerid, Textdraw50);
    TextDrawHideForPlayer(playerid, Textdraw51);
    TextDrawHideForPlayer(playerid, Textdraw52);
    KillTimer(SpeedTimer[playerid]);
    KillTimer(FuelTimer[playerid]);
    TankFreeze[playerid] = 0;
    pInfo[playerid][duty] = 0;
    if(IsInBus[playerid] == 1)
    {
    IsInBus[playerid] = 0;
    KillTimer(Timer1[playerid]);
    KillTimer(Timer2[playerid]);
    }
    if(IsInCargo[playerid] == 1)
    {
    IsInBus[playerid] = 0;
    }
    OnPlayerGangWarDeath(playerid, killerid);
    if(IsPlayerInArea(playerid,Zone1Koords)){
    if(Zone1Angriff == 1){
    if(pInfo[playerid][team] == 3 || pInfo[playerid][team] == 5 || pInfo[playerid][team] == 6){
    Skintod[playerid]=1;
    }
    }
    }
    else if(IsPlayerInArea(playerid,Zone2Koords)){
    if(Zone2Angriff == 1){
    if(pInfo[playerid][team] == 3 || pInfo[playerid][team] == 5 || pInfo[playerid][team] == 6){
    Skintod[playerid]=1;
    }
    }
    }
    else if(IsPlayerInArea(playerid,Zone3Koords)){
    if(Zone3Angriff == 1){
    if(pInfo[playerid][team] == 3 || pInfo[playerid][team] == 5 || pInfo[playerid][team] == 6){
    Skintod[playerid]=1;
    }
    }
    }
    else if(IsPlayerInArea(playerid,Zone4Koords)){
    if(Zone4Angriff == 1){
    if(pInfo[playerid][team] == 3 || pInfo[playerid][team] == 5 || pInfo[playerid][team] == 6){
    Skintod[playerid]=1;
    }
    }
    }
    else if(IsPlayerInArea(playerid,Zone5Koords)){
    if(Zone5Angriff == 1){
    if(pInfo[playerid][team] == 3 || pInfo[playerid][team] == 5 || pInfo[playerid][team] == 6){
    Skintod[playerid]=1;
    }
    }
    }
    else if(IsPlayerInArea(playerid,Zone6Koords)){
    if(Zone6Angriff == 1){
    if(pInfo[playerid][team] == 3 || pInfo[playerid][team] == 5 || pInfo[playerid][team] == 6){
    Skintod[playerid]=1;
    }
    }
    }
    if(KriegtKeinWanted(killerid))
    {
    if(pInfo[playerid][WantedLevel] >= 1)
    {
    new strafe, time, string[128], geld;
    geld = GetPlayerWantedLevel(playerid)*1000;
    time = GetPlayerWantedLevel(playerid)*6;
    KillTimer(timer[playerid]);
    strafe = GetPlayerWantedLevel(playerid);
    new DerBulle[MAX_PLAYER_NAME], DerSpieler[MAX_PLAYER_NAME], nstring[128];
    GetPlayerName(killerid,DerBulle,sizeof(DerBulle));
    GetPlayerName(playerid,DerSpieler,sizeof(DerSpieler));
    format(nstring,sizeof nstring,"Officer %s hat den Verdächdigen %s erschossen",DerBulle,DerSpieler);
    SendClientMessageToAll(COLOR_RED,nstring);
    format(string,sizeof string, "Du wurdest für %d Minuten und %d Dollar eingesperrt.", time, geld);
    SendClientMessage(playerid, COLOR_RED,string);
    SetPlayerWantedLevel(playerid,0);
    pInfo[playerid][WantedLevel] = 0;
    SetPlayerPos(playerid, 198.7066,162.2354,1003.0300);
    SetPlayerInterior(playerid,3);
    pInfo[playerid][Knastzeit] = strafe*60*4;
    pInfo[playerid][Knast] = 1;
    ResetPlayerWeapons(playerid);
    pInfo[playerid][Waffendabei] = 0;
    timer[playerid] = SetTimerEx("Knasttimer",1000,1,"d",playerid);
    GivePlayerSaveMoney(playerid, -strafe*1000);
    GivePlayerSaveMoney(playerid, strafe*1000/4);
    }
    }

    if(!KriegtKeinWanted(killerid))
    {
    pInfo[killerid][WantedLevel]+= 1;
    SetPlayerWantedLevel(killerid, pInfo[killerid][WantedLevel]);
    new string[128],tname[MAX_PLAYERS],oname[MAX_PLAYERS];
    GetPlayerName(killerid,tname,sizeof(tname));
    GetPlayerName(playerid,oname,sizeof(oname));
    format(string,sizeof(string),"[Computer]: Gerade wurde eine Straftat begangen [Strafe: Mord] [Opfer: %s] [Täter[ID]: %s]",oname,tname);
    SendCopMessage(COLOR_BLUE, string);
    }
    //------------------------------------------------------------------------------
    return 1;
    }

  • public OnPlayerSpawn(playerid)
    {
    AntiDeAMX();
    Skintod[playerid] = 0;
    SetPlayerPos(playerid,2634.0413,2348.8684,10.6719);
    SetPlayerColor(playerid,COLOR_WHITE);
    SetPlayerInterior(playerid,0);
    SetPlayerFacingAngle(playerid,189.2417);
    new pname[MAX_PLAYERS],save[256];
    GetPlayerName(playerid,pname,sizeof pname);
    format(save,sizeof save,"Spieler/%s.ini",pname);
    if(fexist(save) && pInfo[playerid][eingeloggt])
    {
    SetPlayerSkin(playerid, dini_Int(save,"Skin"));
    }
    if(MOTD[playerid] == 0)
    {
    MOTD[playerid] = 1;
    new string[256];
    string = dini_Get("motd.ini", "motd");
    ShowPlayerDialog(playerid, DIALOG_MOTD, DIALOG_STYLE_MSGBOX, "Motd",string,"Weiter", "");
    }
    if(pInfo[playerid][tut] == 0)
    {
    tut1(playerid);
    SetTimerEx("tut2", 7000, 0, "d", playerid);
    SetTimerEx("tut3", 14000, 0, "d", playerid);
    SetTimerEx("tut4", 21000, 0, "d", playerid);
    }
    else
    {
    if(pInfo[playerid][team] == 1)
    {
    SetPlayerHealth(playerid,100);
    SetPlayerColor(playerid,COLOR_BLUE);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 2281.5410,2430.0112,3.2734);
    }
    else if(pInfo[playerid][team] == 2)
    {
    SetPlayerHealth(playerid,100);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1661.2737,1297.0653,10.8203);
    SetPlayerFacingAngle(playerid, 268.8291);
    }
    else if(pInfo[playerid][team] == 3)
    {
    SetPlayerHealth(playerid,100);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1887.0701,2339.5535,10.8203);
    SetPlayerFacingAngle(playerid, 276.2490);
    }
    else if(pInfo[playerid][team] == 4)
    {
    SetPlayerHealth(playerid,100);
    SetPlayerColor(playerid,COLOR_RED);
    SetPlayerInterior(playerid, 10);
    SetPlayerPos(playerid, 234.6192,110.6250,1003.2257);
    SetPlayerFacingAngle(playerid, 276.2490);
    }
    else if(pInfo[playerid][team] == 5)
    {
    SetPlayerHealth(playerid,100);
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,2195.5239,1601.0657,1005.0625);
    SetPlayerFacingAngle(playerid, 276.2490);
    }
    else if(pInfo[playerid][team] == 6)
    {
    SetPlayerHealth(playerid, 100);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 2491.9724,2397.7590,4.2109);
    SetPlayerFacingAngle(playerid, 265.9162);
    }
    else if(pInfo[playerid][team] == 7)
    {
    ResetPlayerWeapons(playerid);
    GivePlayerWeapon(playerid,24,50);
    GivePlayerWeapon(playerid,29,500);
    GivePlayerWeapon(playerid,31,1500);
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,-1345.8600,492.8836,11.2027);
    SetPlayerFacingAngle(playerid, 272.0928);
    }
    else if(pInfo[playerid][team] == 8)
    {
    SetPlayerPos(playerid,-2164.6675,646.2283,1057.5938);
    SetPlayerInterior(playerid,1);
    SetPlayerFacingAngle(playerid,183.9038);
    SetPlayerHealth(playerid, 100.0);
    }
    if(pInfo[playerid][Knast] > 0)
    {
    KillTimer(timer[playerid]);
    timer[playerid] = SetTimerEx("Knasttimer",1000,1,"d",playerid);
    SetPlayerPos(playerid, 198.7066,162.2354,1003.0300);
    SetPlayerInterior(playerid,3);
    SendClientMessage(playerid,COLOR_RED,"Du hast deine Strafe noch nicht abgesessen, zurück in den Knast!");
    }


    }
    new color1 = dini_Int("zones.ini","Zone1");
    new color2 = dini_Int("zones.ini","Zone2");
    new color3 = dini_Int("zones.ini","Zone3");
    new color4 = dini_Int("zones.ini","Zone4");
    new color5 = dini_Int("zones.ini","Zone5");
    new color6 = dini_Int("zones.ini","Zone6");
    GangZoneShowForPlayer(playerid, Zone1, color1);
    GangZoneShowForPlayer(playerid, Zone2, color2);
    GangZoneShowForPlayer(playerid, Zone3, color3);
    GangZoneShowForPlayer(playerid, Zone4, color4);
    GangZoneShowForPlayer(playerid, Zone5, color5);
    GangZoneShowForPlayer(playerid, Zone6, color6);
    return 1;
    }

  • okay danke geht jezt :D


    hab jezt aber nochmal 2 eig fast gleiche probleme


    1. wenn ich jmd mit /makeleader leader mache kommt er wieder zu dieser auswwahl


    und 2. am anfang im einlogg dialog sehe ich unten auch diese anzeige wie kann ich diese ausblenden?

  • da bekomm ich nen error mit undefined symbol: giveplayer


    und wenn ich statt giveplayer playerid nehm spawnt er nicht sondern kommt ebenfalls zur auswahl


    //edit: WUHUU 100. Beitrag :D :D

    Einmal editiert, zuletzt von T.i.m.O ()

  • Ok, vielen Dank vorerst für alle Antworten.
    Nur wenn ich ingame nun /makeleader mache dann spawnt der jenige ganz kurz, aber gleich danach kommt er wieder in die auswahl :(
    Wie kann ich dass beheben?


    Gruss timo

    Einmal editiert, zuletzt von T.i.m.O ()