Beiträge von Kaliber

    Schreibe es mal so:


    if(strcmp(cmdtext, "/wanted", true) == 0)
    {
    for(new i=0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPVarInt(i,"WantedLevel") > 0)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(i, name, sizeof(name));
    format(string,sizeof(string),"Gesucht: %s || Wanted's: %i",name,GetPVarInt(i,"WantedLevel"));
    SendClientMessage(playerid,ROT,string);
    }
    }
    }
    return 1;
    }


    mfg. :thumbup:

    Das legt die Größe des Speichers fest, das benötigt man eigentlich nicht ^^


    mfg. :thumbup:


    //EDIT: Hier nochmal ausführlich


    Code
    Sets the size of memory (in cells) assigned to the stack and heap. Required if you get the excess memory usage warning after compilation (a wierd table after the compiler copyright line)

    Fehlt da bei dem SQL ding nicht noch was, du hast da jetzt den string, setzt aber ein return 1;


    Musst du das nicht noch irgentwie schreiben ?!


    mfg. :thumbup:


    //EDIT:


    Bsp, was ich meine:


    new sql[1024];
    format(sql, sizeof(sql), "INSERT INTO `ServerCars` (`CarID`, `FloatX`, `FloatY`, `FloatZ`, `FloatA`, `Preis`) VALUES('%s', '%s', '%s', '%s', '%s', '%s')", vehID, Float:vehx, Float:vehy, Float:vehz, Float:veha, preis);
    mysql_query(sql); //irgentwie sowas ?!
    return 1;

    Hab grad mal nachgeschaut, hier:


    SetPlayerInterior(playerid, 6);
    SetPlayerPos(playerid, 264.8789,77.7013,1001.0391);
    SetPlayerFacingAngle(playerid, 270.4932);


    mfg. :thumbup:

    Ja, dann gehst du da rein und läufst in den Knast (mit Airbreak), dann machst du /save und hast die position...


    oder


    du gehst auf einen anderen Server, lässt dich dort arresten und dann machst du /save und hast die position...


    mfg. :thumbup:

    Schreibe es so:


    if(!isPlayerAnAdmin(playerid,2))
    {
    if(GetVehicleModel(vehicleid) == 520)
    {
    if(PlayerInfo[playerid][pLevel] < 3)
    {
    SendClientMessage(playerid,COLOR_RED,"Du weißt nicht wie du in das Fahrzeug kommen sollst!");
    TogglePlayerControllable(playerid,false);
    TogglePlayerControllable(playerid,true);
    }
    }
    }


    mfg. :thumbup:

    Schreibe das ganz alles ganz unten in dein Script, sollte soweit funzen ;)


    stock anty(string[])
    {
    if (!isnull (text))
    {
    new
    idx,
    i,
    ipstring [128],
    string [128],
    len = strlen (text);


    for (i = 0; i < len; ++i)
    if (text [i] != ' ')
    string [idx++] = text [i];


    if (!(len = strlen (string)))
    return false;


    if (!strfind (string, "www.", false) || !strfind (string, "http://", false) || !strfind (string, ".com", false) || !strfind (string, ".net", false)
    || !strfind (string, ".de", false) || !strfind (string, ".org", false) || !strfind (string, "|", false))
    return true;


    for (i = 0, idx = 0; i < len; ++i)
    {
    if (string [i] == ':')
    {
    ipstring [idx] = '\0';
    if (ipstring [0] && SplitIp (ipstring) != 0xFFFFFFFF)
    return true;
    idx = 0;
    ipstring [0] = '\0';
    }
    else if ('0' <= string [i] <= '9' || string [i] == '.')
    ipstring [idx++] = string [i];
    }


    ipstring [idx] = '\0';
    if (ipstring [0] && SplitIp (ipstring) != 0xFFFFFFFF)
    return true;
    }
    return false;
    }


    stock BytesToWord (byte0, byte1, byte2, byte3, &word, mode = 0)
    {
    switch (mode)
    {
    case 0:
    {
    new bytes [4 char]; // 4 char = 1
    bytes {0} = byte3;
    bytes {1} = byte2;
    bytes {2} = byte1;
    bytes {3} = byte0;
    word = bytes [0];
    }


    default:
    {
    word = byte0; // & 0xFF;
    word |= (byte1 << 8); // & 0xFF00;
    word |= (byte2 << 16); // & 0xFF0000;
    word |= (byte3 << 24); // & 0xFF000000;
    }
    }
    }
    stock SplitIp(ipstring [])
    {
    new
    j,
    bytes [4],
    word;


    for (new i = 0, len = strlen (ipstring); i < len; ++i)
    {
    if (j > 3)
    return 0xFFFFFFFF;


    if (ipstring [i] == ' ')
    continue;


    if (ipstring [i] == '*')
    bytes [j] = 0xFF;
    else if (ipstring [i] == '.')
    {
    ++j;
    }
    else if ('0' <= ipstring [i] <= '9')
    {
    bytes [j] = 10 * bytes [j] + ipstring [i] - '0';
    if (bytes [j] > 0xFF || bytes [j] < 0)
    return 0xFFFFFFFF;
    }
    else
    return 0xFFFFFFFF;
    }
    BytesToWord (bytes [0], bytes [1], bytes [2], bytes [3], word);
    return word;
    }


    mfg. :thumbup: