Beiträge von OutPlayed

    ErikSon


    Dann kriege ich diese Error
    C:\Dokumente und Einstellungen\Cedric\Eigene Dateien\Dropbox\samp03x_svr_R2_win32\gamemodes\reallife.pwn(1002) : error 029: invalid expression, assumed zero
    C:\Dokumente und Einstellungen\Cedric\Eigene Dateien\Dropbox\samp03x_svr_R2_win32\gamemodes\reallife.pwn(1002) : error 001: expected token: ";", but found "return"
    C:\Dokumente und Einstellungen\Cedric\Eigene Dateien\Dropbox\samp03x_svr_R2_win32\gamemodes\reallife.pwn(1003) : warning 225: unreachable co

    Ich möchte das ich den befehl für Fraktion 1 und 3 nutzen kann
    Code:
    ocmd:setrank(playerid,params[])
    {
    if(isPlayerInFrakt(playerid,1)) && if(isPlayerInFrakt(playerid,3))return SendClientMessage(playerid,GRAU,"Du kannst diesen Befehl nicht nutzen."); //FEHLERZEILE
    if(!isPlayerRang(playerid,5))return SendClientMessage(playerid,GRAU,"Du bist kein Leader!.");
    new pID,rank;
    new s[128];
    if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,HELLBLAU,"/setrank [Name/ID] [Rank]");
    if(rank<1||rank>5)return SendClientMessage(playerid,GRAU,"Bitte gültigen Fraktions Rang angeben.");
    SetPVarInt(pID,"FraktionRang",rank);
    format(s,sizeof(s),"Du hast %s zum %s befördert",sName(pID),RangName(pID));
    SendClientMessage(playerid,HELLBLAU,s);
    format(s,sizeof(s),"Du wurdest von %s zum %s befördert",sName(playerid),RangName(pID));
    SendClientMessage(pID,HELLBLAU,s);
    SpielerSpeichern(pID);
    return 1;
    }



    Error
    C:\Dokumente und Einstellungen\Cedric\Eigene Dateien\Dropbox\samp03x_svr_R2_win32\gamemodes\reallife.pwn(1002) : error 029: invalid expression, assumed zero
    C:\Dokumente und Einstellungen\Cedric\Eigene Dateien\Dropbox\samp03x_svr_R2_win32\gamemodes\reallife.pwn(1002) : warning 215: expression has no effect
    C:\Dokumente und Einstellungen\Cedric\Eigene Dateien\Dropbox\samp03x_svr_R2_win32\gamemodes\reallife.pwn(1002) : error 001: expected token: ";", but found "if"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Ich bekomme immer die Nachricht das ich das Auto abgeschleppt habe egal ob ich in der nähe eine Autos bin oder nicht
    if(newkeys==KEY_YES)
    {
    if(!isPlayerInFrakt(playerid,3))return SendClientMessage(playerid,WEIß,"Du bist nicht biem ADAC angestellt");
    {
    if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
    {
    SendClientMessage(playerid,0xFFFF00AA,"Versuche Fahrzeug abzuschleppen!");
    new Float:pX,Float:pY,Float:pZ;
    GetPlayerPos(playerid,pX,pY,pZ);
    new Float:vX,Float:vY,Float:vZ;
    new Found=0;
    new vid=0;
    while((vid<MAX_VEHICLES)&&(!Found))
    {
    vid++;
    GetVehiclePos(vid,vX,vY,vZ);
    if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
    {
    Found=1;
    if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
    {
    DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
    }
    AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
    SendClientMessage(playerid,0xFFFF00AA,"Auto am Hacken!");
    }
    }
    if (!Found)
    {
    SendClientMessage(playerid,0xFFFF00AA,"Es ist kein Auto in der Nähe!");
    }
    }
    }
    }
    return 1;
    }

    Es wird keine Datei erstellt
    Die Stocks:
    //___________________________________________VEH SYSTEM__________________________________________________________________
    stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawntime, ownername[MAX_PLAYER_NAME])
    {
    new carid = GetFreeVehicleSlot();
    carData[carid][model] = modelid;
    carData[carid][xspawn] = x;
    carData[carid][yspawn] = y;
    carData[carid][zspawn] = z;
    carData[carid][anglespawn] = angle;
    carData[carid][col1] = color1;
    carData[carid][col2] = color2;
    carData[carid][respawn] = respawntime;
    carData[carid][owner] = ownername;
    validcar[carid] = true;
    CreateVehicle(modelid, x, y, z, angle, color1, color2, respawntime);
    return carid;
    }
    stock SaveVehicle(vehicle, filename[36])
    {
    new iniid = ini_CreateIniFile(filename);
    ini_SetInt(iniid, "Model", carData[vehicle][model]);
    ini_SetFloat(iniid, "XSpawn", carData[vehicle][xspawn]);
    ini_SetFloat(iniid, "YSpawn", carData[carid][yspawn]);
    ini_SetFloat(iniid, "ZSpawn", carData[carid][zspawn]);
    ini_SetInt(iniid, "anglespawn", carData[carid][anglespawn]);
    ini_SetInt(iniid, "col1", carData[carid][col1]);
    ini_SetInt(iniid, "col2", carData[carid][col2]);
    ini_SetInt(iniid, "respwantime", carData[carid][respawn]
    ini_SetInt(iniid, "besitzer", carData[carid][owner]
    }
    stock SaveAllVehicles()
    {
    new saveindex = 0;
    new fname[36];
    for(new i = 0; i < MAX_VEHICLES; i ++)
    {
    if(validcar[i])
    {

    format(fname, sizeof(fname), "/vehicles/%d.ini", saveindex);
    SaveVehicle(i, fname);
    saveindex ++;
    }
    }
    stock LoadVehicle(filename[36])
    {
    new iniid = ini_OpenIni(filename);
    CreateVehicleEx(ini_GetInt(iniid, "Model"), ini_GetFloat(iniid, "XSpawn"),ini_GetFloat(iniid, "YSpawn"),ini_GetFloat(iniid, "ZSpawn"),ini_GetInt(iniid, "anglespawn"),ini_GetInt(iniid, "col1"),ini_GetInt(iniid, "col2"),ini_GetInt(iniid, "respwantime"),ini_GetInt(iniid, "besitzer"));
    ini_CloseIni(iniid);
    }
    stock LoadAllVehicles()
    {
    new fname[36];
    new index = 0;
    format(fname, sizeof(fname), "%d.ini", index);
    while(fexist(fname))
    {
    LoadVehicle(fname);
    index ++;
    format(fname, sizeof(fname), "%d.ini", index);
    }
    }