[SUCHE]Veh System

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
  • ich hätte da was für dich ocmd:veh(playerid,params[])
    {
    new Float:vehx,Float:vehy,Float:vehz;
    new vehid,cc1,cc2,string[128];
    if(sscanf(params,"iii",vehid,cc1,cc2))return SendClientMessage(playerid, ROT,"INFO: /newcar [CAR-ID] [COLOR 1] [COLOR 2]");
    if(IsPlayerAnAdmin(playerid,1))
    {
    GetPlayerPos(playerid,vehx,vehy,vehz);
    new carid = CreateVehicle(vehid,vehx,vehy,vehz,3,cc1,cc2,-1);
    PutPlayerInVehicle(playerid, carid, 0);
    format(string,sizeof(string),"Du hast ein Admincar gespawnt! (FahrzeugID :%d)",GetVehicleModel(GetPlayerVehicleID(playerid)));
    SendClientMessage(playerid,BLAU,string);
    }
    return 1;
    }

  • E:\Dokumente und Einstellungen\Systemadministrator\Desktop\Pawno\gamemodes\Selfmade100.pwn(387) : error 017: undefined symbol "IsPlayerAnAdmin"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    if(IsPlayerAnAdmin(playerid,2))


    Need Help!

  • stock IsPlayerAnAdmin(playerid,level){
    if(GetPVarInt(playerid,"Adminlevel")>=level)return 1;
    return 0; }


  • ocmd:veh(playerid,params[])
    {
    if(isPlayerAnAdmin(playerid,3))
    {
    new Float:x, Float:y, Float:z;
    new Text3D:supportveh[MAX_VEHICLES];
    new c1,c2,vid;
    if(sscanf(params,"iii",vid,c1,c2))return SendClientMessage(playerid,Admin,"Benutzung: /veh [CarID] [Farbe1] [Farbe2]");
    {
    if(vid<402||vid>603)return SendClientMessage(playerid,Admin,"Ungültige Fahrzeug-ID.");
    {
    GetPlayerPos(playerid,x,y,z);
    new car;
    SetVehicleNumberPlate(car = CreateVehicle(vid,x,y,z,3,c1,c2,-1),"Admin");
    PutPlayerInVehicle(playerid,car,0);
    SendClientMessage(playerid,Admin,"Du hast dein Supporter-Car gespawnt.");
    supportveh[car] = Create3DTextLabel("Admin-Mobil",Arot,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(supportveh[car],car,0.0,0.0,2.0);
    return 1;
    }
    }
    }
    return 1;
    }

    und

    ocmd:delcar(playerid,params[])
    {
    if(isPlayerAnAdmin(playerid,1))
    {
    new currentveh;
    currentveh = GetPlayerVehicleID(playerid);
    DestroyVehicle(currentveh);
    return 1;
    }
    return 0;
    }

  • E:\Dokumente und Einstellungen\Systemadministrator\Desktop\Pawno\gamemodes\Selfmade100.pwn(389) : error 017: undefined symbol "Adminlevel"
    E:\Dokumente und Einstellungen\Systemadministrator\Desktop\Pawno\gamemodes\Selfmade100.pwn(391) : error 017: undefined symbol "Admin"
    E:\Dokumente und Einstellungen\Systemadministrator\Desktop\Pawno\gamemodes\Selfmade100.pwn(397) : error 017: undefined symbol "Admin"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.


    ocmd:veh(playerid,params[])
    {
    if(isPlayerAnAdmin(playerid,3))
    {
    new Float:x, Float:y, Float:z;
    new Text3D:supportveh[MAX_VEHICLES];
    new c1,c2,vid;
    if(sscanf(params,"iii",vid,c1,c2))return SendClientMessage(playerid,Adminlevel,"Benutzung: /veh [CarID] [Farbe1] [Farbe2]");
    {
    if(vid<402||vid>603)return SendClientMessage(playerid,Admin,"Ungültige Fahrzeug-ID.");
    {
    GetPlayerPos(playerid,x,y,z);
    new car;
    SetVehicleNumberPlate(car = CreateVehicle(vid,x,y,z,3,c1,c2,-1),"Admin");
    PutPlayerInVehicle(playerid,car,0);
    SendClientMessage(playerid,Admin,"Du hast dein Supporter-Car gespawnt.");
    supportveh[car] = Create3DTextLabel("Admin-Mobil",drot,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(supportveh[car],car,0.0,0.0,2.0);
    return 1;
    }
    }
    }
    return 1;
    }

  • So alles Richtig Tim


    ocmd:veh(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Info: Du bist kein Admin");
    {
    new Float:x, Float:y, Float:z;
    new Text3D:supportveh[MAX_VEHICLES];
    new c1,c2,vid;
    if(sscanf(params,"iii",vid,c1,c2))return SendClientMessage(playerid,BLAU,"FEHLER: /veh [CarID] [Farbe1] [Farbe2]");
    {
    if(vid<402||vid>603)return SendClientMessage(playerid,ROT,"Ungültige Fahrzeug-ID.");
    {
    GetPlayerPos(playerid,x,y,z);
    new car;
    SetVehicleNumberPlate(car = CreateVehicle(vid,x,y,z,3,c1,c2,-1),"Admin");
    PutPlayerInVehicle(playerid,car,0);
    SendClientMessage(playerid,WEIß,"Du hast dein Admin-Car gespawnt.");
    supportveh[car] = Create3DTextLabel("Admin-Mobil",ORANGE,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(supportveh[car],car,0.0,0.0,2.0);
    return 1;
    }
    }
    }
    }


    ocmd:delcar(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Info: Du bist kein Admin");
    {
    new currentveh;
    currentveh = GetPlayerVehicleID(playerid);
    DestroyVehicle(currentveh);
    return 1;
    }
    }

  • Lösung :


    ocmd:veh(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Info: Du bist kein Admin");
    {
    new Float:x, Float:y, Float:z;
    new Text3D:supportveh[MAX_VEHICLES];
    new c1,c2,vid;
    if(sscanf(params,"iii",vid,c1,c2))return SendClientMessage(playerid,BLAU,"FEHLER: /veh [CarID] [Farbe1] [Farbe2]");
    {
    if(vid<402||vid>603)return SendClientMessage(playerid,ROT,"Ungültige Fahrzeug-ID.");
    {
    GetPlayerPos(playerid,x,y,z);
    new car;
    SetVehicleNumberPlate(car = CreateVehicle(vid,x,y,z,3,c1,c2,-1),"Support");
    PutPlayerInVehicle(playerid,car,0);
    SendClientMessage(playerid,rot,"Du hast ein Supporter Mobil gespawnt.");
    supportveh[car] = Create3DTextLabel("Supporter Mobil", blau,0.0,0.0,0.0,50.0,0,1);
    Attach3DTextLabelToVehicle(supportveh[car],car,0.0,0.0,2.0);
    return 1;
    }
    }
    }
    }


    ocmd:delcar(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Info: Du bist kein Admin");
    {
    new currentveh;
    currentveh = GetPlayerVehicleID(playerid);
    DestroyVehicle(currentveh);
    return 1;
    }