Beiträge von Ph!l!pp-)GeR(-

    ich brauch da n bischen hilfe


    error:
    C:\Documents and Settings\Owner\My Documents\SamP\gamemodes\reallife.pwn(4550) : error 017: undefined symbol "sscanf"



    dcmd_strafzettel(playerid,params[])
    {
    new id, strafgeld;
    new string[128];
    if(sscanf(params, "ud",id,strafgeld))
    {
    return SendClientMessage(playerid,COLOR_RED,"Benutze: /strafzettel [ID][Geld]!");
    }
    if (id == playerid){
    return SendClientMessage(playerid,COLOR_RED,"Du kannst dir nicht selber einen Strafzettel geben!");
    }
    new polizist[MAX_PLAYER_NAME];
    if(SpielerInfo[playerid][Job] == 1 || SpielerInfo[playerid][Admin] > 4)


    {
    GetPlayerName(playerid,polizist,sizeof(polizist));
    GetPlayerMoney(id);
    GivePlayerMoney(id,-strafgeld);


    format(string,sizeof(string),"Du hast einen Strafzettel bekommen von %s! (Höhe: %d)",polizist, strafgeld);
    SendClientMessage(id, 0xFF6633FF,string);
    return 1;
    }
    return 1;
    }


    Ich hab Dcmd noch nie benutz also sry bin absoluter noob in Dcmd


    mfg philipp


    Edit ich habs aber danke. Hier man musses nur definieren xD sehr helle von mir :D


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

    new changestr[16], changepos = 0, strpos = stringPos;
    while(changepos < 16 && string[strpos] && string[strpos] != delim)
    {
    changestr[changepos++] = string[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(string, format[formatPos], false, stringPos)) == -1)
    {
    if (format[end + 1])
    {
    return -1;
    }
    return 0;
    }
    format[end] = '\'';
    stringPos = ch + (end - formatPos);
    formatPos = end + 1;
    }
    case 'u':
    {
    new
    end = stringPos - 1,
    id = 0,
    bool:num = true,
    ch;
    while ((ch = string[++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
    string[end] = '\0';
    num = false;
    new
    name[MAX_PLAYER_NAME];
    id = end - stringPos;
    foreach (Player, playerid)
    {
    GetPlayerName(playerid, name, sizeof (name));
    if (!strcmp(name, string[stringPos], true, id))
    {
    setarg(paramPos, 0, playerid);
    num = true;
    break;
    }
    }
    if (!num)
    {
    setarg(paramPos, 0, INVALID_PLAYER_ID);
    }
    string[end] = ch;
    #if defined __SSCANF_FOREACH__
    #undef foreach
    #undef __SSCANF_FOREACH__
    #endif
    }
    stringPos = end;
    }
    case 's', 'z':
    {
    new
    i = 0,
    ch;
    if (format[formatPos])
    {
    while ((ch = string[stringPos++]) && ch != delim)
    {
    setarg(paramPos, i++, ch);
    }
    if (!i)
    {
    return -1;
    }
    }
    else
    {
    while ((ch = string[stringPos++]))
    {
    setarg(paramPos, i++, ch);
    }
    }
    stringPos--;
    setarg(paramPos, i, '\0');
    }
    default:
    {
    continue;
    }
    }
    while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
    {
    stringPos++;
    }
    while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
    {
    stringPos++;
    }
    paramPos++;
    }
    do
    {
    if ((delim = format[formatPos++]) > ' ')
    {
    if (delim == '\'')
    {
    while ((delim = format[formatPos++]) && delim != '\'') {}
    }
    else if (delim != 'z')
    {
    return delim;
    }
    }
    }
    while (delim > ' ');
    return 0;
    }

    könnte mir jemand das auf strcmp umschreiben ???? wen ichs mach kommen immer errors


    Mit Freundlichsten Grüßen
    Philipp


    Kevin


    Hast du gesehn wie lang die sachen auseinander waren ???? da waren 1 - 2 tage dazwischen ><

    so weit bin ich schonma aber ich weiss nicht weiter ?!!



    if (strcmp("/straffzettel",cmd,true) == 0)
    {
    if(SpielerInfo[playerid][Job] == 1 || SpielerInfo[playerid][Admin] > 4)
    {
    tmp = strtok(cmdtext, idx);
    if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: straffzettel [preis]");
    new ppreis = strval(tmp);
    new mess[128];
    new Float:CopX;
    new Float:CopY;
    new Float:CopZ;
    GetPlayerPos(playerid, CopX, CopY, CopZ);
    //Wie find ich jetzt hier das car ??? und wen jmd einsteigt muss er zahlen
    format(mess,sizeof(mess),"Du hast einen Straffzettel in höhe von %s verteilt",ppreis);
    return 1;
    }
    else
    {
    SendClientMessage(playerid,Rot,"du bist kein Cop /admin");
    }
    return 1;
    }


    Ich weiss echt nich weiter
    ich nutz kein GF ?!
    aber danke für die antwort

    Hi,


    Ich wollte gerne das man jemandem strafzettel geben kann ich hab nur keine ahnung wie ich das machen soll dsa man neben dem auto steht und dan z.b. /strazettel [preis] eingeben muss und so das der strafzettel auch bis zum restart bleibt ich hoffe ihr könnt mir helfen oder hab nen guten link


    MFG Philipp

    das versteh ich schon nur weiss nich nciht wie ich dan einen straffzettel an das auto "pinnen" soll vom script her `? wie soll ich die Carid z.b. ermitteln ohne das da jmd drinne sitzt ?

    Hi,


    Ich wollte gerne das man jemandem strafzettel geben kann ich hab nur keine ahnung wie ich das machen soll dsa man neben dem auto steht und dan z.b. /strazettel [preis] eingeben muss und so das der strafzettel auch bis zum restart bleibt ich hoffe ihr könnt mir helfen oder hab nen guten link


    MFG Philipp

    nene das sind cars die man sich so kaufen kann bei denen das nich geht aber wie soll ichs ändern das die cars auch nen tank haben ? hier ma der teil wo se gestreamt werden



    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    for(new i = 1;i<MAX_AUTOS;i++)
    {
    if(PlayerAuto[i][id_x] == vehicleid)
    {
    FahrzeugTunen(vehicleid);
    return 1;
    }
    }
    return 1;
    }

    Hi,


    Ich hab das Problem das wen ich einen Spieler folgen lassen möchte kemmt er nur zu mir und das wars ich möchte aber das er ca alle 1 bis 2 sec immer wieder hinter mir ist hab nur kein plan wie ich dsa machen soll


    Hier mein Code



    if (strcmp("/folgenlassen",cmd,true) == 0)
    {
    if(SpielerInfo[playerid][Job] == 1 ||SpielerInfo[playerid][Job] == 2 || SpielerInfo[playerid][Job] == 3)
    {
    tmp = strtok(cmdtext, idx);
    if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /folgenlassen [playerid]");
    new playa = strval(tmp);
    new Float:coppx,Float:coppy,Float:coppz;
    GetPlayerPos(playerid, coppx, coppy, coppz);
    SetPlayerPos(playa, coppx, coppy, coppz);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist kein Cop");
    return 1;
    }
    }


    MfG Philipp


    Edit: kein GF !

    Hi ich habe das problem wen ich auf meinem Server /GmX mache dan wird auch alles restartet wie es sein soll
    nur
    das der/die Spieler dan immer in der Startcam "festsitzen" man kannzwar rumlaufen aber man ist immer in der cam bzw die sicht.


    könnt ihr mir sagen was ich falsch gemacht hab bzw. vergessen ?


    MfG Philipp

    hier mal meine Crashinfo.txt


    Exception At Address: 0x00481634




    Registers:


    EAX: 0x00000000 EBX: 0x00000400 ECX: 0x00000100 EDX: 0x7EFEFEFF


    ESI: 0x00000000 EDI: 0x00D1A4B0 EBP: 0x00000000 ESP: 0x0012FD60


    EFLAGS: 0x00010206




    Stack:


    +0000: 0x01250020 0x00D1A480 0x00D1A4B0 0x00472F5B


    +0010: 0x00D1A4B0 0x00000000 0x00000400 0x00D19F00


    +0020: 0x00000000 0x0012FDB8 0x01120DB8 0x00000000


    +0030: 0x0046557E 0x00000000 0x43D48000 0x00000000


    +0040: 0x00D19F00 0x00D19F00 0x01080E70 0x01250020


    +0050: 0x00000000 0x0110E4CC 0x0108367C 0x00401096


    +0060: 0x00D19F00 0x01120DB8 0x010A7224 0x00402BB3


    +0070: 0x00D19F00 0x00000016 0x0012FDF0 0x01120DB8


    +0080: 0x004BB0C8 0x00D19F00 0x00000001 0x00000000


    +0090: 0x00000000 0x0007976C 0x00079B94 0x00079BB0


    +00A0: 0x00075BB4 0x00079BA4 0x00075BB4 0x01080E70


    +00B0: 0x010A7224 0x00000000 0x01080020 0x000263B4


    +00C0: 0x00461544 0x00D19F00 0x0012FE38 0x00000014


    +00D0: 0x00987700 0xFFFFFFFF 0x00000014 0x00987700


    +00E0: 0x004789D8 0x004BB0C8 0x0049C481 0x00985C61


    +00F0: 0xFFFFFFFF 0x00000000 0x00D19F00 0x0012FEDC


    +0100: 0x00491B08 0xFFFFFFFF 0x00477E1F 0x00000001


    +0110: 0x00000000 0x00000A28 0x0012FFC0 0x7FFDE000


    +0120: 0x00002BA3 0x00010101 0x00000032 0x00001E61


    +0130: 0x00000070 0x00000C4C 0x00987700 0x656D6167


    kann das jmd. lesen ? bzw auslesen


    mfg philipp

    hallo,


    auf Unserem server wird grad nur ein grosses Schwarzes Bild gezeigt mit der in schrift loading wen man sich einloggt warum ??


    Server daten:


    Opteron mit 2x2,6 GHz und 4GB Ram
    mfg philipp


    Edit: Heute Zeigt er Ganz gross "Stay within the World BOundries" aber so was btw. so etwas in der Art hab ich noch nie Gescriptet und es ist kein GF Edit !