Beiträge von keeev.

    Ich möchte das man dort wieder Spawnt wo man Offline gegangen ist, ausser die, die in einer Fraktion sind also wie LSPD, ARMY, SFPD, FBI & SWAT sonst sollen alle dort spawnen wo sie offline gegangen sind!


    MfG Kevin! <3

    Immer wenn ich das:
    if(!strcmp(strget(cmdtext,0),"/goto"))
    {
    if(Spieler[playerid][Admin] >= 2)
    {
    if(!strlen(strget(cmdtext,1)))
    return
    SendClientMessage(playerid,Rot,"Benutze: /goto [ID]");
    new string[128];
    new spieler[MAX_PLAYER_NAME];
    new admin[MAX_PLAYER_NAME];
    new id = strval(strget(cmdtext,1));
    GetPlayerName(playerid,admin,sizeof(admin));
    GetPlayerName(id,spieler,sizeof(spieler));
    format(string, sizeof(string), "%s hat sich zu dir geportet!", admin);
    SendClientMessage(id, Gelb, string);
    format(string, sizeof(string), "Du hast dich zu %s geportet!",spieler);
    SendClientMessage(playerid, Gelb, string);
    new Float:sx1,Float:sy1,Float:sz1;
    new Float:sa1;
    GetPlayerPos(id, sx1, sy1, sz1);
    GetPlayerFacingAngle(id, sa1);
    if(IsPlayerInAnyVehicle(playerid))
    {
    SetVehiclePos(playerid, sx1, sy1, sz1);
    SetVehicleZAngle(playerid, sa1);
    }
    else
    {
    SetPlayerPos(playerid, sx1, sy1, sz1);
    SetPlayerFacingAngle(playerid, sa1);
    }
    } else {
    SendClientMessage(playerid, Rot, "Du bist kein Admin/Supporter !");
    }
    }
    if(!strcmp(strget(cmdtext,0),"/get"))
    {
    if(Spieler[playerid][Admin] >= 2)
    {
    if(!strlen(strget(cmdtext,1)))
    return
    SendClientMessage(playerid,Rot,"Benutze: /get [ID]");
    new string[128];
    new spieler[MAX_PLAYER_NAME];
    new admin[MAX_PLAYER_NAME];
    new id = strval(strget(cmdtext,1));
    GetPlayerName(playerid,admin,sizeof(admin));
    GetPlayerName(id,spieler,sizeof(spieler));
    format(string, sizeof(string), "%s hat dich zu sich geportet!", admin);
    SendClientMessage(id, Gelb, string);
    format(string, sizeof(string), "Du hast %s zu dir geportet!",spieler);
    SendClientMessage(playerid, Gelb, string);
    new Float:sx1,Float:sy1,Float:sz1;
    new Float:sa1;
    GetPlayerPos(playerid, sx1, sy1, sz1);
    GetPlayerFacingAngle(playerid, sa1);
    if(IsPlayerInAnyVehicle(id))
    {
    SetVehiclePos(id, sx1, sy1, sz1);
    SetVehicleZAngle(id, sa1);
    }
    else
    {
    SetPlayerPos(id, sx1, sy1, sz1);
    SetPlayerFacingAngle(id, sa1);
    }
    } else {
    SendClientMessage(playerid, Rot, "Du bist kein Admin/Supporter !");
    }
    }


    Einfüge stürzt Pawno ab wenn ich F5 drücke :(

    Wie kann man machen das nur Fraktions mitglieder das Tor öffnen können ?


    #define fraktname1 "LSPD"
    #define fraktname2 "Army"
    #define fraktname3 "Ballas"
    #define fraktname4 "LA"
    #define fraktname5 "Taxi"
    #define fraktname6 "News"
    #define fraktname7 "Feuerwehr"
    #define fraktname8 "Medic"
    #define fraktname9 "Grove Street"
    #define fraktname10 "SFPD"
    #define fraktname11 "FBI"
    #define fraktname12 "SWAT"


    Und nur LSPD soll das Tor öffnen können und auch wieder schliessen können!:
    public lspdtor(playerid)
    {
    if(!IsPlayerInRangeOfPoint(playerid,100, 1584.6560058594, -1638.4405517578, 12.339740753174))return SendClientMessage(playerid,ROT,"Du bist nicht in der Nähe vom Tor");
    MoveObject(tor0, 1584.6560058594, -1638.4405517578, 12.339740753174-10,9);
    return 1;
    }


    public lspdtorzu(playerid)
    {
    if(!IsPlayerInRangeOfPoint(playerid,100, 1584.6560058594, -1638.4405517578, 12.339740753174))return SendClientMessage(playerid,ROT,"Du bist nicht in der Nähe vom Tor");
    MoveObject(tor0, 1584.6560058594, -1638.4405517578, 12.3397407531747,3);
    return 1;
    }


    Was ist das -.-


    Habe das eingefügt:
    ocmd:kick(playerid,params[])
    {
    new pID, reason[128],string[128];
    if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,BLAU,"/kick [id] [grund]");
    format(string,sizeof(string),"AdmCmd: %s wurde von %s gekickt. Grund: %s",SpielerName(pID),SpielerName(playerid),reason);
    SendClientMessageToAll(ROT,string);
    Kick(pID);
    return 1;
    }


    Und oben SSCANF und OCMD Included..

    Aber kommen immernoch fehler .. :
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(536) : warning 219: local variable "Spielerdatei" shadows a variable at a preceding level
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(537) : warning 219: local variable "name" shadows a variable at a preceding level
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    Hier die Zeilen 530 - 540:
    LoadAccount(playerid);
    SendClientMessage(playerid,BLAU,"Du hast dich erfolgreich eingeloggt.");
    return 1;
    }
    else
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));

    Bekomme immer den Fehler:


    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(239) : error 017: undefined symbol "SpielerSpeichern"
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(269) : warning 235: public function lacks forward declaration (symbol "lspdtor")
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(276) : warning 235: public function lacks forward declaration (symbol "lspdtorzu")
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(282) : warning 235: public function lacks forward declaration (symbol "armytor")
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(290) : warning 235: public function lacks forward declaration (symbol "armytorzu")
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(534) : warning 219: local variable "Spielerdatei" shadows a variable at a preceding level
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(535) : warning 219: local variable "name" shadows a variable at a preceding level
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(539) : warning 217: loose indentation
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(561) : warning 203: symbol is never used: "playerid"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    Das mit Army tor undso ist egal !
    Hier die datei:


    #include <a_samp>
    #include <dini>


    #define BLAU 0x0087FFFF
    #define ROT 0xE10000FF


    #define DIALOG_REGISTER 1
    #define DIALOG_LOGIN 2


    new tor0;
    new tor2;
    new tor3;


    main()
    {
    print("\n----------------------------------");
    print(" SAMP Reallife (Beta V.01)");
    print("----------------------------------\n");
    }


    forward auf(playerid);
    forward zu(playerid);


    public OnGameModeInit()
    {
    SetGameModeText("Beta V.01");
    AddPlayerClass(0,1481.1211,-1769.8683,18.7958,359.8440,0,0,0,0,0,0); // postion
    AddPlayerClass(1,1481.1211,-1769.8683,18.7958,359.8440,0,0,0,0,0,0); // postion
    AddPlayerClass(2,1481.1211,-1769.8683,18.7958,359.8440,0,0,0,0,0,0); // postion
    AddPlayerClass(3,1481.1211,-1769.8683,18.7958,359.8440,0,0,0,0,0,0); // postion
    AddPlayerClass(4,1481.1211,-1769.8683,18.7958,359.8440,0,0,0,0,0,0); // postion


    tor0 = CreateObject(987, 1584.6560058594, -1638.4405517578, 12.339740753174, 0, 0, 0);
    tor2 = CreateObject(987, 924.77709960938, -1223.4279785156, 15.9765625, 0, 0, 90);
    tor3 = CreateObject(987, 924.77709960938, -1232.6469726563, 15.9765625, 0, 0, 90);



    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    if(IsPlayerNPC(playerid))return 1;
    SetPlayerPos(playerid,2047.4270,1336.5569,10.6719);
    SetPlayerFacingAngle(playerid,188.9284);
    SetPlayerCameraPos(playerid,2047.6205,1333.3314,10.6719);
    SetPlayerCameraLookAt(playerid,2047.4270,1336.5569,10.6719);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    if(dini_Exists(Spielerdatei))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden! Gebe bitte dein Passwort ein!","Login","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Bitte gib das gewünschte Passwort ein!:","Register","Abbrechen");
    }
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    SpielerSpeichern(playerid);
    ResetVariablen(playerid);
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public lspdtor(playerid)
    {
    if(!IsPlayerInRangeOfPoint(playerid,10, 1584.6560058594, -1638.4405517578, 12.339740753174))return SendClientMessage(playerid,ROT,"Du bist nicht in der Nähe vom Tor");
    MoveObject(tor0, 1584.6560058594, -1638.4405517578, 12.339740753174-10,9);
    return 1;
    }


    public lspdtorzu(playerid)
    {
    if(!IsPlayerInRangeOfPoint(playerid,10, 1584.6560058594, -1638.4405517578, 12.339740753174))return SendClientMessage(playerid,ROT,"Du bist nicht in der Nähe vom Tor");
    MoveObject(tor0, 1584.6560058594, -1638.4405517578, 12.3397407531747,3);
    return 1;
    }
    public armytor(playerid)
    {
    if(!IsPlayerInRangeOfPoint(playerid,10, 924.77709960938, -1223.4279785156, 15.9765625))return SendClientMessage(playerid,ROT,"Du bist nicht in der Nähe vom Tor");
    MoveObject(tor2, 924.77709960938, -1223.4279785156, 15.9765625-10,9);
    MoveObject(tor3, 924.77709960938, -1232.6469726563, 15.9765625-10,9);
    return 1;
    }


    public armytorzu(playerid)
    {
    if(!IsPlayerInRangeOfPoint(playerid,10, 924.77709960938, -1223.4279785156, 15.9765625))return SendClientMessage(playerid,ROT,"Du bist nicht in der Nähe vom Tor");
    MoveObject(tor2, 924.77709960938, -1223.4279785156, 15.9765625,3);
    MoveObject(tor3, 924.77709960938, -1232.6469726563, 15.9765625,3);
    return 1;
    }



    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/lspdtor", cmdtext, true, 10) == 0)
    {
    lspdtor(playerid);
    return 1;
    }
    if (strcmp("/lspdtorzu", cmdtext, true, 10) == 0)
    {
    lspdtorzu(playerid);
    return 1;
    }
    if (strcmp("/armytor", cmdtext, true, 10) == 0)
    {
    armytor(playerid);
    return 1;
    }
    if (strcmp("/armytorzu", cmdtext, true, 10) == 0)
    {
    armytorzu(playerid);
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid==DIALOG_LOGIN)
    {
    if(response==0)
    {
    SendClientMessage(playerid,ROT,"Du hast den Vorgang abgebrochen,");
    Kick(playerid);
    return 1;
    }
    if(response==1)
    {
    if(!strlen(inputtext))
    {
    SendClientMessage(playerid,ROT,"Das Passwort war nicht lang genug!");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Dein Account wurde gefunden! Gebe bitte dein Passwort ein!","Login","Abbrechen");
    return 1;
    }
    else
    {
    Login(playerid,inputtext);
    return 1;
    }
    }
    }
    if(dialogid==DIALOG_REGISTER)
    {
    if(response==0)
    {
    SendClientMessage(playerid,ROT,"Du hast den Vorgang abgebrochen,");
    Kick(playerid);
    return 1;
    }
    if(response==1)
    {
    if(!strlen(inputtext))
    {
    SendClientMessage(playerid,ROT,"Das Passwort war nicht lang genug!");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Bitte gib das gewünschte Passwort ein!:","Register","Abbrechen");
    return 1;
    }
    else
    {
    Register(playerid,inputtext);
    return 1;
    }
    }
    }



    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }


    stock Register(playerid,key[])
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    dini_Create(Spielerdatei);
    dini_Set(Spielerdatei,"Passwort",key);
    SendClientMessage(playerid,BLAU,"Du hast dich erfolgreich registriert.");
    SetPlayerScore(playerid,0);
    return 1;
    }


    stock Login(playerid,key[])
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    if(!strcmp(key,dini_Get(Spielerdatei,"Passwort"),false))
    {
    LoadAccount(playerid);
    SendClientMessage(playerid,BLAU,"Du hast dich erfolgreich eingeloggt.");
    return 1;
    }
    else
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
    return 1;
    }
    }


    stock LoadAccount(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    return 1;
    }


    stock Spielerspeichern(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
    return 1;
    }
    stock ResetVariablen(playerid)
    {
    return 1;
    }

    Also wenn ich F5 Drücke kommt folgender fehler:
    "C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(441 -- 442) : error 029: invalid expression, assumed zero
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(442) : warning 217: loose indentation
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(442) : warning 215: expression has no effect
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(442) : error 001: expected token: ";", but found ")"
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(442) : error 029: invalid expression, assumed zero
    C:\Program Files\gtasa\gamemodes\tutorialkevin.pwn(442) : fatal error 107: too many error messages on one line"


    Hier sind die zeilen 435-445:
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid==DIALOG_REGISTER)
    (
    if(response==0)
    (
    SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen.");
    Kick(playerid);







    BItte um Hilfe!

    Datei im anhang ..
    mit admin rechte gehts. .
    kann man einstellen wo man hingespawnt wird ?
    wenn ja ändert das mal pls ..
    und ich möchte das die tore sich z.B beim lspd öffnen sobald man hupt ..