Beiträge von CubedDeath

    Füge das mal bei public OnPlayerConnect im ExtremAdmin script ein:


    public OnPlayerConnect(playerid) {
    new string[256],PlayerName[24],file[256]; file = GetPlayerFile(playerid);
    GetPlayerName(playerid,PlayerName,24); if(!dini_Exists(file)) CreateUserConfigFile(playerid);
    for(new i = 0; i < 100; i++) {
    if(strfind(PlayerName,ForbidNames[i],true)!=-1 && Config[ForbidData]) {
    switch(Config[ForbidData]) { case 1: Kick(playerid); case 2: Ban(playerid); }
    return 1;
    }
    }
    if(Config[DisplayServerMessage]) { format(string,sizeof(string),"Server Message: %s",dini_Get("/xadmin/Configuration/Configuration.ini","ServerMessage")); SendClientMessage(playerid,green,string); }
    Variables[playerid][Registered] = GetPlayerFileVar(playerid,"Registered"),
    Variables[playerid][Level] = GetPlayerFileVar(playerid,"Level");
    Variables[playerid][Wired] = GetPlayerFileVar(playerid,"Wired");
    Variables[playerid][Jailed] = GetPlayerFileVar(playerid,"Jailed");
    if(Variables[playerid][Wired]) SetUserInt(playerid,"WiredWarnings",Config[WiredWarnings]);
    if(Variables[playerid][Level] > Config[MaxLevel]) { Variables[playerid][Level] = Config[MaxLevel]; SetUserInt(playerid,"Level",Config[MaxLevel]); }
    if(!Variables[playerid][Registered]) format(string,256,"Welcome, %s. To register an account to this server, type \"/REGISTER <PASSWORD>\".",PlayerName);
    else {
    new tmp[50],tmp2[256]; GetPlayerIp(playerid,tmp,50); tmp2 = dini_Get(file,"IP");
    if(!strcmp(tmp,tmp2,true)) {
    format(string,256,"Welcome back, %s. You have automatically been logged in.",PlayerName);
    Variables[playerid][LoggedIn] = true;
    }
    else {
    format(string,256,"Welcome back, %s. To log back into your account, type \"/LOGIN <PASSWORD>\".",PlayerName);
    Variables[playerid][LoggedIn] = false;
    }else{
    SendClientMessage(playerid, COLOR_RED, "Du wurdest gekickt!");
    Kick(playerid);
    }
    }
    SendClientMessage(playerid,yellow,string);
    for(new i = 0; i < MAX_VEHICLES; i++) if(VehicleLockData[i]) SetVehicleParamsForPlayer(i,playerid,false,true);
    if(Config[DisplayConnectMessages]) { format(string,256,"*** %s has joined the server.",PlayerName); for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && playerid != i) SendClientMessage(i,grey,string); }
    return 1;
    }

    Hallo,


    Ich habe mir ein Reallife script runtergeladen und es ein bisschen verändert (kein GF!) nur irgendwie verstehe ich das speichersystem für die autos net ganz und funtz auch net, sprich wenn ich /kaufen und /parken mache steht da das auto wurde geparkt aber nach nem Gamemoderestart ist das auto net mehr da ?( :( naja vll kann mir einer helfen und vll ein neues Speicher System schreiben :)
    if(strcmp(cmdtext, "/parken", true)==0 && gTeam[playerid] == TEAM_CARSELLER){
    if(IsPlayerInAnyVehicle(playerid)){
    new Float:x,Float:y,Float:z,Float:a,vehicleid;
    vehicleid = GetPlayerVehicleID(playerid);
    GetVehiclePos(vehicleid,x,y,z);
    GetVehicleZAngle(vehicleid,a);
    SendClientMessage(playerid,0xFFFFFFFF,"Auto geparkt.");
    for(new count;count<MAX_VEHICLES;count++){
    format(string, sizeof(string),"vehicle_%d.sav",vehicleid);
    if(dini_Exists(string)){
    dini_FloatSet(string,"x",x);
    dini_FloatSet(string,"y",y);
    dini_FloatSet(string,"z",z);
    dini_FloatSet(string,"a",a);
    count = MAX_VEHICLES;
    }
    }
    }else{
    SendClientMessage(playerid,0xFFFFFFFF,"Du must in einem Auto sein um den Befehl zu benutzten.");
    }
    return 1;
    }

    if(strcmp(cmd, "/kaufen", true)==0 && gTeam[playerid] == TEAM_CARSELLER){
    new tmp[256];
    new modelid;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) {
    SendClientMessage(playerid, COLOR_WHITE, "Use: /kaufen [modelid]");
    return 1;
    }
    modelid = strval(tmp);
    SendClientMessage(playerid,COLOR_GREEN,"=================================================");
    SendClientMessage(playerid,COLOR_GREEN,"Auto gekauft.");
    SendClientMessage(playerid,COLOR_GREEN,"Der Mechaniker wird dir das Auto bringen!");
    SendClientMessage(playerid,COLOR_GREEN,"=================================================");
    for(new count;count<MAX_VEHICLES;count++){
    format(string, sizeof(string),"vehicle_%d.sav",count);
    if(!dini_Exists(string)){
    dini_Create(string);
    dini_IntSet(string,"model",modelid);
    dini_FloatSet(string,"x",(1084.8602));
    dini_FloatSet(string,"y",(1355.9254));
    dini_FloatSet(string,"z",(10.8203));
    dini_FloatSet(string,"a",(270.3685));
    count = MAX_VEHICLES;
    CreateVehicle(modelid,1084.8602,1355.9254,10.8203,270.3685,0,0,300000);
    }
    return 1;
    }

    }