Beiträge von Paul Blart


    Ne von Mafiafight :D


    OnPlayerTakeDamage finde ich nicht :D

    Hey leute,


    ich habe dieses Support System in mein Script eingebaut, und ein bisschen umgeschrieben mit den Farben und so.
    Jetzt habe ich folgendes Problem: Ich kann zwar ein /sup schreiben und auch löschen und alles aber ich kann es nicht annehmen. Ich habe auch den "Tickets" ordner erstellt.


    Und meine andere Frage war wie dass geht wenn z. B.: Spieler A den Spieler B abschiest und ihn trifft dass dann ein "Bing" ertönt.


    MfG


    Paul

    ocmd moment ist ja nicht viel code :D


    Script

    #include <a_samp>
    #include <dini>
    #include <ocmd>

    Script
    #define BLAU 0x0087FFFF
    #define ROT 0xE10000FF

    Script
    #define BLAU 0x0087FFFF
    #define ROT 0xE10000FF
    #define Schwarz 0x000000FF
    #define Gelb 0xFFFF00FF
    #define Rot 0xFF0000FF
    #define Gruen 0x00FF00FF
    #define Blau 0x0000FFFF
    #define Weis 0xFFFFFFFF
    #define Lila 0xFF00FFFF
    #define Hellblau 0x00FFFFFF
    #define Dunkelgruen 0x009600FF
    #define Unsichtbar 0x00000000
    #define Orange 0xFF9800FF
    #define Grau 0x828282FF
    #define GRAU 0xAFAFAFAA
    #define GELB 0xFFFF00AA

    Script
    new dmopen[2];

    Script
    main()
    {
    print("\n----------------------------------");
    print("TutorialServer");
    print("----------------------------------\n");
    }

    Script
    public OnGameModeInit()
    {
    AddPlayerClass(0,669.3842,-589.7758,16.3359,86.8245,24,10000,0,0,0,0);

    Script
    //DAPD:

    Script
    CreateObject(3475, 644.400024, -611.099976, 16.200001, 0.000000, 0.000000, 358.000000); //object (vgsn_fncelec_pst) (1)
    CreateObject(3475, 641.500000, -607.200012, 16.200001, 0.000000, 0.000000, 76.992065); //object (vgsn_fncelec_pst) (2)
    CreateObject(3475, 637.099976, -604.200012, 16.200001, 0.000000, 0.000000, 33.241211); //object (vgsn_fncelec_pst) (3)
    CreateObject(3475, 634.700012, -600.500000, 16.200001, 0.000000, 0.000000, 32.991577); //object (vgsn_fncelec_pst) (4)
    CreateObject(3475, 631.299988, -585.099976, 16.100000, 0.000000, 0.000000, 180.236206); //object (vgsn_fncelec_pst) (5)
    CreateObject(3475, 641.099976, -613.900024, 16.200001, 0.000000, 0.000000, 270.241577); //object (vgsn_fncelec_pst) (6)
    CreateObject(3475, 635.200012, -613.900024, 16.200001, 0.000000, 0.000000, 270.236206); //object (vgsn_fncelec_pst) (7)
    CreateObject(3475, 629.200012, -613.900024, 16.200001, 0.000000, 0.000000, 270.236206); //object (vgsn_fncelec_pst) (8)
    CreateObject(3475, 623.299988, -613.900024, 16.200001, 0.000000, 0.000000, 270.236206); //object (vgsn_fncelec_pst) (9)
    CreateObject(3475, 617.400024, -613.900024, 16.200001, 0.000000, 0.000000, 270.236206); //object (vgsn_fncelec_pst) (10)
    CreateObject(3475, 607.099976, -590.400024, 17.200001, 0.000000, 0.000000, 179.990845); //object (vgsn_fncelec_pst) (11)
    CreateObject(3475, 607.099976, -584.400024, 17.100000, 0.000000, 0.000000, 179.989014); //object (vgsn_fncelec_pst) (12)
    CreateObject(3475, 628.700012, -582.000000, 16.100000, 0.000000, 0.000000, 89.236450); //object (vgsn_fncelec_pst) (13)
    CreateObject(3785, 618.500000, -594.700012, 18.900000, 0.000000, 0.000000, 0.000000); //object (bulkheadlight) (1)
    CreateObject(3785, 618.500000, -599.299988, 18.900000, 0.000000, 0.000000, 0.000000); //object (bulkheadlight) (2)
    CreateObject(3785, 618.500000, -603.700012, 18.900000, 0.000000, 0.000000, 0.000000); //object (bulkheadlight) (3)
    CreateObject(3785, 613.099976, -583.200012, 19.200001, 0.000000, 0.000000, 266.000000); //object (bulkheadlight) (4)
    CreateObject(3785, 609.099976, -583.200012, 19.200001, 0.000000, 0.000000, 265.995483); //object (bulkheadlight) (5)
    dmopen[0] = CreateObject(16500, 632.299988, -595.599976, 16.799999, 0.000000, 0.000000, 13.250000); //dmopen
    dmopen[1] = CreateObject(16500, 631.599976, -590.700012, 16.799999, 0.000000, 0.000000, 2.996948); //object (cn2_savgardr1_) (2)
    return 1;
    }

    Script
    public OnGameModeExit()
    {
    return 1;
    }

    Script
    public OnPlayerRequestClass(playerid, classid)
    {
    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;
    }

    Script
    public OnPlayerConnect(playerid)
    {
    return 1;
    }

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

    Script
    public OnPlayerSpawn(playerid)
    {
    return 1;
    }

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

    Script
    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }

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

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

    Script
    ocmd:open(playerid,params[])
    {
    MoveObject(dmopen[0],632.299988, -595.599976, 0.799999,2.0);
    return 1;
    }

    Script
    ocmd:kick(playerid,params[])
    {
    if(IsPlayerAdmin(playerid))return SendClientMessage(playerid,ROT,"Du bist kein Admin.");
    new pID, reason[128],string[128];
    if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,Orange,"/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);
    new serverlog[128];
    format(serverlog,sizeof(serverlog), "%s hat /kick an %s wegen dem Grund: %s benutzt",SpielerName(playerid),SpielerName(pID),reason);
    printf(serverlog);
    return 1;
    }

    Script
    ocmd:veh(playerid,params[])
    {
    if(IsPlayerAdmin(playerid))
    {
    new Float:x, Float:y, Float:z, Float:Angle, vid, f1, f2;
    if(sscanf(params,"iii",vid,f1,f2))return SendClientMessage(playerid,BLAU,"Benutzung: /veh [Vehicle ID] [Farbe1] [Farbe2]");
    //if(vid<400||vid>431) return SendClientMessage(playerid, Rot, "Bitte gültige id Eingeben");
    if(!IsPlayerAdmin(playerid)) if(vid == 432 || vid == 548 || vid == 537 || vid == 538 || vid == 520) return SendClientMessage(playerid, Dunkelgruen,"Du darfst dieses Fahrzeug nicht spawnen");
    //if(vid<433||vid>611) return SendClientMessage(playerid, Rot, "Bitte gültige id Eingeben");
    GetPlayerPos(playerid,x,y,z);
    //AddStaticVehicle(vid,x+1,y+1,z,Angle,f1,f2);
    new cv = CreateVehicle(vid,x,y,z,Angle,f1,f2,-1);
    GetPlayerVehicleID(vid);
    PutPlayerInVehicle(playerid, cv, 0);
    //PutPlayerInVehicle(playerid,vid,0);
    new serverlog[128];
    format(serverlog,sizeof(serverlog), "[cmd] [%s] :/veh %d ",SpielerName(playerid),GetPlayerVehicleID(playerid));
    printf(serverlog);
    }
    else if(!IsPlayerAdmin(playerid))
    {
    ShowPlayerDialog(playerid,7,DIALOG_STYLE_LIST,"Fahrzeug auswahl","Monster Truck\nTest\nTest","","");
    }
    return 1;
    }

    Script
    ocmd:descar(playerid,params[])
    {
    new vid;
    vid=GetPlayerVehicleID(playerid);
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,ROT,"Du bist kein Admin!!!");
    DestroyVehicle(vid);
    new serverlog[128];
    format(serverlog,sizeof(serverlog), "%s hat /descar benutzt",SpielerName(playerid));
    printf(serverlog);
    return 1;
    }

    Script
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext,"/spawn",true)==0)
    {
    SpawnPlayer(playerid);
    return 1;
    }
    if(strcmp(cmdtext,"/nschild",true)==0)
    {
    if(IsPlayerInAnyVehicle(playerid))
    {
    new vehicleid;
    vehicleid=GetPlayerVehicleID(playerid);
    SetVehicleNumberPlate(vehicleid,"Test");
    SetVehicleToRespawn(vehicleid);
    PutPlayerInVehicle(playerid,vehicleid,0);
    }
    return 1;
    }
    return 0;
    }

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

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

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

    Script
    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }

    Script
    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }

    Script
    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }

    Script
    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }

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

    Script
    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }

    Script
    public OnObjectMoved(objectid)
    {
    return 1;
    }

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

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

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

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

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

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

    Script
    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }

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

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

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

    Script
    public OnPlayerUpdate(playerid)
    {
    return 1;
    }

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

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

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

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

    Script
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    return 1;
    }

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

    Script
    stock SpielerName(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    }

    Script
    stock sscanf(sstring[], format[], {Float,_}:...)
    {
    #if defined isnull
    if (isnull(sstring))
    #else
    if (sstring[0] == 0 || (sstring[0] == 1 && sstring[1] == 0))
    #endif
    {
    return format[0];
    }
    #pragma tabsize 4
    new
    formatPos = 0,
    sstringPos = 0,
    paramPos = 2,
    paramCount = numargs(),
    delim = ' ';
    while (sstring[sstringPos] && sstring[sstringPos] <= ' ')
    {
    sstringPos++;
    }
    while (paramPos < paramCount && sstring[sstringPos])
    {
    switch (format[formatPos++])
    {
    case '\0':
    {
    return 0;
    }
    case 'i', 'd':
    {
    new
    neg = 1,
    num = 0,
    ch = sstring[sstringPos];
    if (ch == '-')
    {
    neg = -1;
    ch = sstring[++sstringPos];
    }
    do
    {
    sstringPos++;
    if ('0' <= ch <= '9')
    {
    num = (num * 10) + (ch - '0');
    }
    else
    {
    return -1;
    }
    }
    while ((ch = sstring[sstringPos]) > ' ' && ch != delim);
    setarg(paramPos, 0, num * neg);
    }
    case 'h', 'x':
    {
    new
    num = 0,
    ch = sstring[sstringPos];
    do
    {
    sstringPos++;
    switch (ch)
    {
    case 'x', 'X':
    {
    num = 0;
    continue;
    }
    case '0' .. '9':
    {
    num = (num << 4) | (ch - '0');
    }
    case 'a' .. 'f':
    {
    num = (num << 4) | (ch - ('a' - 10));
    }
    case 'A' .. 'F':
    {
    num = (num << 4) | (ch - ('A' - 10));
    }
    default:
    {
    return -1;
    }
    }
    }
    while ((ch = sstring[sstringPos]) > ' ' && ch != delim);
    setarg(paramPos, 0, num);
    }
    case 'c':
    {
    setarg(paramPos, 0, sstring[sstringPos++]);
    }
    case 'f':
    {

    Script
    new changestr[16], changepos = 0, strpos = sstringPos;
    while(changepos < 16 && sstring[strpos] && sstring[strpos] != delim)
    {
    changestr[changepos++] = sstring[strpos++];
    }
    changestr[changepos] = '\0';
    setarg(paramPos,0,_:floatstr(changestr));
    }
    case 'p':
    {
    delim = format[formatPos++];
    continue;
    }
    case '\'':
    {
    new
    end = formatPos - 1,
    ch;
    while ((ch = format[++end]) && ch != '\'') {}
    if (!ch)
    {
    return -1;
    }
    format[end] = '\0';
    if ((ch = strfind(sstring, format[formatPos], false, sstringPos)) == -1)
    {
    if (format[end + 1])
    {
    return -1;
    }
    return 0;
    }
    format[end] = '\'';
    sstringPos = ch + (end - formatPos);
    formatPos = end + 1;
    }
    case 'u':
    {
    new
    end = sstringPos - 1,
    id = 0,
    bool:num = true,
    ch;
    while ((ch = sstring[++end]) && ch != delim)
    {
    if (num)
    {
    if ('0' <= ch <= '9')
    {
    id = (id * 10) + (ch - '0');
    }
    else
    {
    num = false;
    }
    }
    }
    if (num && IsPlayerConnected(id))
    {
    setarg(paramPos, 0, id);
    }
    else
    {
    #if !defined foreach
    #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
    #define __SSCANF_FOREACH__
    #endif
    sstring[end] = '\0';
    num = false;
    new
    name[MAX_PLAYER_NAME];
    id = end - sstringPos;
    foreach (Player, playerid)
    {
    GetPlayerName(playerid, name, sizeof (name));
    if (!strcmp(name, sstring[sstringPos], true, id))
    {
    setarg(paramPos, 0, playerid);
    num = true;
    break;
    }
    }
    if (!num)
    {
    setarg(paramPos, 0, INVALID_PLAYER_ID);
    }
    sstring[end] = ch;
    #if defined __SSCANF_FOREACH__
    #undef foreach
    #undef __SSCANF_FOREACH__
    #endif
    }
    sstringPos = end;
    }
    case 's', 'z':
    {
    new
    i = 0,
    ch;
    if (format[formatPos])
    {
    while ((ch = sstring[sstringPos++]) && ch != delim)
    {
    setarg(paramPos, i++, ch);
    }
    if (!i)
    {
    return -1;
    }
    }
    else
    {
    while ((ch = sstring[sstringPos++]))
    {
    setarg(paramPos, i++, ch);
    }
    }
    sstringPos--;
    setarg(paramPos, i, '\0');
    }
    default:
    {
    continue;
    }
    }
    while (sstring[sstringPos] && sstring[sstringPos] != delim && sstring[sstringPos] > ' ')
    {
    sstringPos++;
    }
    while (sstring[sstringPos] && (sstring[sstringPos] == delim || sstring[sstringPos] <= ' '))
    {
    sstringPos++;
    }
    paramPos++;
    }
    do
    {
    if ((delim = format[formatPos++]) > ' ')
    {
    if (delim == '\'')
    {
    while ((delim = format[formatPos++]) && delim != '\'') {}
    }
    else if (delim != 'z')
    {
    return delim;
    }
    }
    }
    while (delim > ' ');
    return 0;
    }

    Hey leute,


    ich brauche da einen einfachen ocmd befehl für /tv <id> ich würde nähmlich auf meinem Server gerne haben, dass ich jeden Beobachten kann und mit "/tv off" Bin ich wieder dort wo ich war als ich /tv eingegeben habe

    Dudalus: jetzt funktioniert es aber ich finde es nicht so toll weil es english ist und ja.
    Ich bin jetzt mal genauer
    ich möchte ein Anticheat Filterscript, oder eine Anleitung so eines zu Schreiben
    in diesem Anticheat soll enthalten sein:


    - Anticheat für Waffen wie etwa Minigun, Flamethrower, Rocket launcher usw.
    - Anti speedhack
    - Anti Commandspam
    - Antispam