Beiträge von bombom48

    public OnPlayerSpawn(playerid)
    {
    if(GetPVarInt(playerid,"Knastzeit")>0)
    {
    SetPlayerInterior(playerid,6);
    SpawnInfo(playerid);
    ErsterSpawn[playerid]=1;
    SetPVarInt(playerid,"Firstconnect",0);
    return 1;
    }
    if(ErsterSpawn[playerid] == 0)//Falls der Spieler noch nicht seinen ersten Spawn hatte => Kein Krankenhaus...
    {
    //Falls ja...
    ErsterSpawn[playerid]=1;//Setzt die Spieler Variable auf 1 => Erster Spawn gehabt
    SpawnInfo(playerid);
    SetPVarInt(playerid,"Firstconnect",0);
    return 1;
    }
    return 1;
    }


    und hier mein stock SpawnInfo


    stock SpawnInfo(playerid)
    {
    new Spieler[512];
    new Sname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Sname,sizeof(Sname));
    format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
    if(GetPVarInt(playerid,"Knastlevel")>5)
    {
    SetTimerEx("KnastTimer6WP",1800000,0,"i",playerid);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid, knast);
    }
    else if(GetPVarInt(playerid,"Knastlevel")==5)
    {
    SetTimerEx("KnastTimer5WP",1500000,0,"i",playerid);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid, knast);
    }
    else if(GetPVarInt(playerid,"Knastlevel")==4)
    {
    SetTimerEx("KnastTimer4WP",1200000,0,"i",playerid);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid, knast);
    }
    else if(GetPVarInt(playerid,"Knastlevel")==3)
    {
    SetTimerEx("KnastTimer3WP",900000,0,"i",playerid);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid, knast);
    }
    else if(GetPVarInt(playerid,"Knastlevel")==2)
    {
    SetTimerEx("KnastTimer2WP",600000,0,"i",playerid);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid, knast);
    }
    else if(GetPVarInt(playerid,"Knastlevel")==1)
    {
    SetTimerEx("KnastTimer1WP",300000,0,"i",playerid);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    SetPlayerColor(playerid, knast);
    }
    else if(GetPVarInt(playerid,"Knastlevel")==0)
    {
    if(GetPVarInt(playerid,"Fraktion")==1) //PD
    {
    SetPlayerColor(playerid, pd);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 282, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 282, 1526.9788,-1678.0612,5.8906,270.9705,0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 280, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 281, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==4)
    {
    SetSpawnInfo(playerid, 0, 283, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 288, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 288, 1526.9788,-1678.0612,5.8906,270.9705, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    }
    else if(GetPVarInt(playerid,"Fraktion")==2)//Terror
    {
    SetPlayerColor(playerid, normal);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 162, 1106.1493,-299.5602,74.5391,89.9890,0,0,0,0,0,0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 162, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 143, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 143, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==4)
    {
    SetSpawnInfo(playerid, 0, 220, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 142, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 142, 1106.1493,-299.5602,74.5391,89.9890, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    }
    else if(GetPVarInt(playerid,"Fraktion")==3) //Army
    {
    SetPlayerColor(playerid,army);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 287,242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 287,242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368, 0, 0, 0, 0, 0, 0);
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    }
    else
    {
    new skinid;
    skinid = SetPVarInt(playerid,"Skin",skinid);
    SetSpawnInfo(playerid,skinid,0,1214.4077,-1813.4712,16.5938,273.2053,0,0,0,0,0,0); //zivi spawn
    SetPlayerSkin(playerid,dini_Int(Spieler,"Skin"));
    SpawnPlayer(playerid);
    SpawnPlayer(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerColor(playerid, normal);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
    }
    }
    return 1;
    }

    Hier mein Code:
    public OnPlayerRequestClass(playerid, classid)
    {
    if(GetPVarInt(playerid,"Firstconnect") ==1)
    {
    SetPlayerPos(playerid,1214.7422,-1813.4523,16.5938);
    SetPlayerCameraLookAt(playerid, 1214.7422,-1813.4523,16.5938);
    SetPlayerCameraPos(playerid, 1219.5780,-1817.1484,17.7969);
    }
    else
    {
    SpawnInfo(playerid);
    SpawnPlayer(playerid);
    SpawnPlayer(playerid);
    return 1;
    }
    return 1;
    }


    KEINE ERRORS!!!


    Der Spieler registriert sich. Kurz (0.5sec ungefähr) kommen die beiden pfeile und der spieler spawnt mit CJ

    Hier der Code:
    public OnPlayerDeath(playerid, killerid, reason)
    {
    new killername[MAX_PLAYER_NAME];
    GetPlayerName(killerid,killername,MAX_PLAYER_NAME);
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
    if(GetPVarInt(killerid,"Fraktion")==1)
    {
    if(GetPlayerWantedLevel(playerid)==1)
    {
    new string[128];
    format(string,sizeof string,"Officer: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",5);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)==2)
    {
    new string[128];
    format(string,sizeof string,"Officer: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",10);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)==3)
    {
    new string[128];
    format(string,sizeof string,"Officer: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",15);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)==4)
    {
    new string[128];
    format(string,sizeof string,"Officer: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",20);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)==5)
    {
    new string[128];
    format(string,sizeof string,"Officer: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",25);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)>6)
    {
    new string[128];
    format(string,sizeof string,"Officer: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",30);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    }
    else if(GetPVarInt(killerid,"Fraktion")==3)
    {
    if(GetPlayerWantedLevel(playerid)==1)
    {
    new string[128];
    format(string,sizeof string,"Soldat: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",5);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)==2)
    {
    new string[128];
    format(string,sizeof string,"Soldat: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",10);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)==3)
    {
    new string[128];
    format(string,sizeof string,"Soldat: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",15);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)==4)
    {
    new string[128];
    format(string,sizeof string,"Soldat: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",20);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)==5)
    {
    new string[128];
    format(string,sizeof string,"Soldat: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",25);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    if(GetPlayerWantedLevel(playerid)>6)
    {
    new string[128];
    format(string,sizeof string,"Soldat: %s hat den Gesuchten %s getötet.",killername,playername);
    SendClientMessageToAll(Orange,string);
    SetTimerEx("KnastTimer",60000,0,"i",playerid);
    SetPlayerWantedLevel(playerid, 0);
    SetPVarInt(playerid,"Knastzeit",30);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    }
    }



    dann der timer:
    public KnastTimer(playerid)
    {
    if(GetPVarInt(playerid,"Knastzeit")==30)
    {
    SetPVarInt(playerid,"Knastzeit",29);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==29)
    {
    SetPVarInt(playerid,"Knastzeit",28);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==28)
    {
    SetPVarInt(playerid,"Knastzeit",27);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==27)
    {
    SetPVarInt(playerid,"Knastzeit",26);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==26)
    {
    SetPVarInt(playerid,"Knastzeit",25);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==25)
    {
    SetPVarInt(playerid,"Knastzeit",24);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==24)
    {
    SetPVarInt(playerid,"Knastzeit",23);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==23)
    {
    SetPVarInt(playerid,"Knastzeit",22);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==22)
    {
    SetPVarInt(playerid,"Knastzeit",21);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==21)
    {
    SetPVarInt(playerid,"Knastzeit",22);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==20)
    {
    SetPVarInt(playerid,"Knastzeit",19);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==19)
    {
    SetPVarInt(playerid,"Knastzeit",18);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==18)
    {
    SetPVarInt(playerid,"Knastzeit",17);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==17)
    {
    SetPVarInt(playerid,"Knastzeit",16);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==16)
    {
    SetPVarInt(playerid,"Knastzeit",15);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==15)
    {
    SetPVarInt(playerid,"Knastzeit",14);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==14)
    {
    SetPVarInt(playerid,"Knastzeit",13);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==13)
    {
    SetPVarInt(playerid,"Knastzeit",12);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==12)
    {
    SetPVarInt(playerid,"Knastzeit",11);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==11)
    {
    SetPVarInt(playerid,"Knastzeit",10);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==10)
    {
    SetPVarInt(playerid,"Knastzeit",9);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==9)
    {
    SetPVarInt(playerid,"Knastzeit",8);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==8)
    {
    SetPVarInt(playerid,"Knastzeit",7);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==7)
    {
    SetPVarInt(playerid,"Knastzeit",6);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==6)
    {
    SetPVarInt(playerid,"Knastzeit",5);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==5)
    {
    SetPVarInt(playerid,"Knastzeit",4);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==4)
    {
    SetPVarInt(playerid,"Knastzeit",3);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==3)
    {
    SetPVarInt(playerid,"Knastzeit",2);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==2)
    {
    SetPVarInt(playerid,"Knastzeit",1);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==1)
    {
    SetPVarInt(playerid,"Knastzeit",0);
    }
    else if(GetPVarInt(playerid,"Knastzeit")==0)
    {
    Spawn(playerid);
    SpawnPlayer(playerid);


    }
    return 1;
    }


    Dann noch mein stock spawn:
    stock Spawn(playerid)
    {
    new Spieler[512];
    new Sname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Sname,sizeof(Sname));
    format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
    if(GetPVarInt(playerid,"Firstconnect")==1)
    {
    SetPVarInt(playerid,"Firstconnect",0);
    //Speichern(playerid); //Speichert die stats
    }
    else
    {
    if(GetPVarInt(playerid,"Knastzeit")>1)
    {
    SetTimerEx("KnastTimer",60000,1,"i",playerid);
    SetSpawnInfo(playerid, 0, 62, 263.8622,77.2192,1001.0391,272.8581,0,0,0,0,0,0);
    SetPlayerInterior(playerid,6);
    }
    else if(GetPVarInt(playerid,"Fraktion")==1)
    {
    SetPlayerColor(playerid, pd);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 282, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 282, 1526.9788,-1678.0612,5.8906,270.9705,3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 280, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 281, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==4)
    {
    SetSpawnInfo(playerid, 0, 283, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 288, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 288, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    }
    else if(GetPVarInt(playerid,"Fraktion")==2)
    {
    SetPlayerColor(playerid, normal);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 162, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 162, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 143, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 143, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==4)
    {
    SetSpawnInfo(playerid, 0, 220, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 142, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 142, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    }
    else if(GetPVarInt(playerid,"Fraktion")==3)
    {
    SetPlayerColor(playerid,army);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 287,242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==4)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 287,242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    }
    else
    {
    new skinid;
    skinid = GetPVarInt(playerid,"Skin");
    SetSpawnInfo(playerid,skinid,0,1214.4077,-1813.4712,16.5938,273.2053,0,0,0,0,0,0); //Eigentlicher noob spawn!!!
    SetPlayerSkin(playerid,dini_Int(Spieler,"Skin"));
    SpawnPlayer(playerid);
    SpawnPlayer(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerColor(playerid, normal);
    return 1;
    }
    return 1;
    }
    return 1;
    }



    Kann vll jemand ein tutorial posten für ein Knast system????

    Hier mein Code:
    ocmd:fesseln(playerid,params[])
    {
    new pID;
    if(pID==playerid)
    {
    SendClientMessage(playerid,Rot,"Du kannst dich nicht selber fesseln");
    }
    else
    {
    new vehicle;
    new vehicle2;
    vehicle = GetPlayerVehicleID(playerid);
    vehicle2 = GetPlayerVehicleID(playerid);
    if(vehicle == vehicle2)
    {
    if(sscanf(params,"d",pID))return SendClientMessage(playerid,Rot,"/fesseln (ID)");

    TogglePlayerControllable(pID,0);
    new string[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string,sizeof(string),"Du wurdest von %s Gefesselt", name);
    SendClientMessage(pID,Gelb,string);
    }
    }
    return 1;
    }


    Keine errors oder Warnings...


    kann jemand einen code schicken wie der richtig geht?

    Is schon egal habe mir überlegt keinen wantedkatalog zu machen..


    Habe den befehl jetzt so:



    ocmd:wanted(playerid,params[])
    {
    if(GetPVarInt(playerid,"Fraktion")==1)
    {
    new pID,reason[128];
    if(sscanf(params,"ds",pID,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Grund)");
    SetPVarInt(pID,"Wantedlevel",GetPlayerWantedLevel(playerid));
    SetPlayerWantedLevel(pID,GetPVarInt(pID,"Wantedlevel")+1);
    new string[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string,sizeof(string),"Du hast ein Verbrechen begangen(%s), Reporter: %s",reason, name);
    SendClientMessage(pID,Gelb,string);
    }
    else if(GetPVarInt(playerid,"Fraktion")==3)
    {
    new pID,reason[128];
    if(sscanf(params,"ds",pID,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Grund)");
    SetPVarInt(pID,"Wantedlevel",GetPlayerWantedLevel(playerid));
    SetPlayerWantedLevel(pID,GetPVarInt(pID,"Wantedlevel")+1);
    new string[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string,sizeof(string),"Du hast ein Verbrechen begangen(%s), Reporter: %s",reason, name);
    SendClientMessage(pID,Gelb,string);
    }
    return 1;
    }

    warum geht der befehl nicht???
    ocmd:wanted(playerid,params[])
    {
    if(GetPVarInt(playerid,"Fraktion")==1)
    {
    new pID,wantedlevel,reason[128];
    if(sscanf(params,"uds",pID,wantedlevel,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Level) (Grund)");
    SetPlayerWantedLevel(pID,wantedlevel);
    new string[64];
    format(string,sizeof(string),"Beampter: %s hat dir %i Wanteds gegeben, Grund:%d",playerid,wantedlevel,reason);
    SendClientMessage(pID,Gelb,string);
    }
    else if(GetPVarInt(playerid,"Fraktion")==3)
    {
    new pID,wantedlevel,reason[128];
    if(sscanf(params,"uds",pID,wantedlevel,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Level) (Grund)");
    SetPlayerWantedLevel(pID,wantedlevel);
    new string[64];
    format(string,sizeof(string),"Beampter:%s hat dir %i Wanteds gegeben, Grund:%d",playerid,wantedlevel,reason);
    SendClientMessage(pID,Gelb,string);
    }
    return 1;
    }

    Das habe ich schon:
    ocmd:einlagern(playerid,params)
    {
    if(GetPVarInt(playerid,"Fraktion")==2)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 223.2816,186.5910,1003.0313))
    {
    if(GetPVarInt(playerid,"Bomben")==1)
    {
    Bombenanzahl++;
    SetPVarInt(playerid,"Bomben",0);
    SendClientMessage(playerid,Grün,"Du hast erfolgreich eine Bombe in das Lager gelegt.");
    dini_IntSet("/daten/bombenlager.ini", "Bomben", Bombenanzahl);
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du hast keine Bombe!");
    }
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du bist nicht in der Nähe des Bombenlagers!");
    }
    }
    return 1;
    }
    ocmd:entnehmen(playerid,params)
    {
    if(GetPVarInt(playerid,"Fraktion")==2)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 223.2816,186.5910,1003.0313))
    {
    if(dini_IntSet("/daten/bombenlager.ini", "Bomben",Bombenanzahl)<0)
    {
    SendClientMessage(playerid,Rot,"Das Bombenlager ist leer!");
    }
    else
    {
    if(GetPVarInt(playerid,"Bomben")==0)
    {
    Bombenanzahl--;
    SetPVarInt(playerid,"Bomben",1);
    SendClientMessage(playerid,Grün,"Du hast erfolgreich eine Bombe aus dem Lager genommen.");
    dini_IntSet("/daten/bombenlager.ini", "Bomben", Bombenanzahl);
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du hast schon eine Bombe!");
    }
    }
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du bist nicht in der Nähe des Bombenlagers!");
    }
    }
    return 1;
    }
    ocmd:anzahl(playerid,params)
    {
    if(GetPVarInt(playerid,"Fraktion")==2)
    {
    new string[64];
    format(string, sizeof(string), "Bombenanzahl im Bombenlager: %d", Bombenanzahl);
    SendClientMessage(playerid,Gelb,string);
    }
    return 1;
    }



    Und jetzt will ich noch das man nicht -bomben im lager hat ich lade das lager bei OnGameModInit und speicher es bei OnGameModeExit

    ok jetzt habe ich das schonmal verstanden habe es eingefügt und 0 errors 0 warnings. werde jetzt ingame testen und mich dann wieder melden.



    //EDIT: Danke das klappt wen es interresiert ich habe jetzt folgende commands der rest ist wie Sonic Hedgehog das Gepostet hat:
    ocmd:einlagern(playerid,params)
    {
    if(GetPVarInt(playerid,"Fraktion")==2)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 223.2816,186.5910,1003.0313))
    {
    if(GetPVarInt(playerid,"Bomben")==1)
    {
    Bombenanzahl++;
    SetPVarInt(playerid,"Bomben",0);
    SendClientMessage(playerid,Grün,"Du hast erfolgreich eine Bombe in das Lager gelegt.");
    dini_IntSet("/daten/bombenlager.ini", "Bomben", Bombenanzahl);
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du hast keine Bombe!");
    }
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du bist nicht in der Nähe des Bombenlagers!");
    }
    }
    return 1;
    }
    ocmd:entnehmen(playerid,params)
    {
    if(GetPVarInt(playerid,"Fraktion")==2)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 223.2816,186.5910,1003.0313))
    {
    if(GetPVarInt(playerid,"Bomben")==0)
    {
    Bombenanzahl--;
    SetPVarInt(playerid,"Bomben",1);
    SendClientMessage(playerid,Grün,"Du hast erfolgreich eine Bombe aus dem Lager genommen.");
    dini_IntSet("/daten/bombenlager.ini", "Bomben", Bombenanzahl);
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du hast schon eine Bombe!");
    }
    }
    else
    {
    SendClientMessage(playerid,Rot,"Du bist nicht in der Nähe des Bombenlagers!");
    }
    }
    return 1;
    }
    ocmd:anzahl(playerid,params)
    {
    if(GetPVarInt(playerid,"Fraktion")==2)
    {
    new string[64];
    format(string, sizeof(string), "Bombenanzahl im Bombenlager: %d", Bombenanzahl);
    SendClientMessage(playerid,Gelb,string);
    }
    return 1;

    bin ich blind oda sehe ich da nix markiert?



    Kannst du mir den code senden wie du das meinst? Ich versteh dini nicht soooo wirklich :(




    bin ich blind oda sehe ich da nix markiert?


    C:\Users\Hannes\Desktop\GTA\gamemodes\netsen.pwn(7) : error 029: invalid expression, assumed zero
    C:\Users\Hannes\Desktop\GTA\gamemodes\netsen.pwn(7) : warning 215: expression has no effect
    C:\Users\Hannes\Desktop\GTA\gamemodes\netsen.pwn(7) : error 001: expected token: ";", but found ")"
    C:\Users\Hannes\Desktop\GTA\gamemodes\netsen.pwn(7) : error 029: invalid expression, assumed zero
    C:\Users\Hannes\Desktop\GTA\gamemodes\netsen.pwn(7) : fatal error 107: too many error messages on one line
    Dann bist du blind....

    stock Spawn(playerid)
    {
    new Spieler[512];
    new Sname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Sname,sizeof(Sname));
    format(Spieler,sizeof(Spieler),"/Spieler/%s.txt",Sname);
    if(GetPVarInt(playerid,"Firstconnect")==1)
    {
    SetPVarInt(playerid,"Firstconnect",0);
    //Speichern(playerid); //Speichert die stats
    }
    else
    {
    if(GetPVarInt(playerid,"Fraktion")==1)
    {
    SetPlayerColor(playerid, pd);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 282, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 282, 1526.9788,-1678.0612,5.8906,270.9705,3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 280, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 281, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==4)
    {
    SetSpawnInfo(playerid, 0, 283, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 288, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 288, 1526.9788,-1678.0612,5.8906,270.9705, 3, 1, 22, 500, 29, 1000);
    return 1;
    }
    }
    else if(GetPVarInt(playerid,"Fraktion")==2)
    {
    SetPlayerColor(playerid, normal);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 162, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 162, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 143, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 281, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==4)
    {
    SetSpawnInfo(playerid, 0, 220, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 142, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 142, 1106.1493,-299.5602,74.5391,89.9890,9,1,22,500,30,1000);
    return 1;
    }
    }
    else if(GetPVarInt(playerid,"Fraktion")==3)
    {
    SetPlayerColor(playerid,army);
    if(GetPVarInt(playerid,"Fraktionsrang")==0)
    {
    SetSpawnInfo(playerid, 0, 287,242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==1)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==2)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==3)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==4)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==5)
    {
    SetSpawnInfo(playerid, 0, 287,242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    if(GetPVarInt(playerid,"Fraktionsrang")==6)
    {
    SetSpawnInfo(playerid, 0, 287, 242.5908,1872.1843,11.4531,91.0368,31,500,22,500,34,100);
    return 1;
    }
    }
    else
    {
    new skinid;
    skinid = GetPVarInt(playerid,"Skin");
    SetSpawnInfo(playerid,skinid,0,1214.4077,-1813.4712,16.5938,273.2053,0,0,0,0,0,0); //Eigentlicher noob spawn!!!
    SetPlayerSkin(playerid,dini_Int(Spieler,"Skin"));
    SpawnPlayer(playerid);
    SpawnPlayer(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerColor(playerid, normal);
    return 1;
    }
    return 1;
    }
    return 1;
    }



    Das ist das gleiche wie bei OnPlayerSpawn und OnPlayerRequestClass


    Außer das bei OnPlayerRequestClass das ist noch Laden(playerid); (wieder ein stock bei mir).

    Also der Spieler Stirbt und Spawnt auf dem Friedhof. Das funzt.
    Dann soll er nach 60 sec wieder zu seinem standart spawn spawnen (das geht nicht immer dann bleibt der spieler einfach da auf dem friedhof stehen und es passiert nichts.)

    Hier mein Code:
    public OnPlayerDeath(playerid, killerid, reason)
    {
    SetSpawnInfo( playerid, 0, 162, 815.3082,-1106.6725,25.7897,358.4577, 0, 0, 0, 0, 0, 0 );
    friedhofszeit = SetTimerEx("friedhof", 60000, false, "i",playerid);
    }


    public friedhof(playerid)
    {
    Spawn(playerid); //Das ist mein Stock mit meiner spawm abfrage
    SpawnPlayer(playerid);
    KillTimer(friedhofszeit);
    return 1;
    }