Beiträge von zombie.modder

    public OnPlayerRequestClass(playerid, classid)
    {
    new String[256];
    if(classid >= 0 && classid <= 2)
    {
    format(String, sizeof(String), "~n~~n~~n~~g~Grove Street Families~n~~w~Los Santos");
    GameTextForPlayer(playerid,String,5000,3);
    SetPlayerPos(playerid, 2507.9360, -1654.9623, 13.5938);
    SetPlayerFacingAngle(playerid, 87.93);
    SetPlayerCameraPos(playerid, 2502.7065,-1654.7733,13.5071);
    SetPlayerCameraLookAt(playerid, 2507.9360, -1654.9623, 13.5938);


    SetPlayerColor(playerid,dunkelgrun);
    }

    Hi,


    ich kriege das beim start von samp_server.exe


    [18:42:02] Loaded 3 filter scripts.


    [18:42:02] xObjects Error: Object 260 had to be missed because there wasnt enough room in its area. Increase the area limit

    und so weiter


    Wie kann ich das area limit ändern :O ?

    ja sry meine Schuld XD


    Probier es so mit timer:


    new Text:Health;
    forward hHealth(playerid);


    Health=TextDrawCreate(386.000000,433.000000,"Vehicle Health: 0%");



    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    SetTimer("hHealth", 1000, true);


    return 1;
    }



    public hHealth(playerid)
    {
    new Float:health;
    new h[3];
    new veh;
    veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    format(h,sizeof(h),"Vehicle Health: %d%",health);
    TextDrawSetString(Health, h);
    TextDrawShowForPlayer(playerid, Health);
    return 1;
    }


    Aus dem Kopf geschrieben^^

    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    new Float:health;
    new h[100];
    new veh;
    veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    format(h,sizeof(h),"Vehicle Health: %d%",health);
    TextDrawSetString(Health, h);
    TextDrawShowForPlayer(playerid, Health);
    return 1;
    }

    probiers so:


    new Text:Health;


    Health=TextDrawCreate(386.000000,433.000000,"Vehicle Health: 0%");


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    new Float:health;
    new h[100];
    new veh;
    veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    format(h,sizeof(h),"Vehicle Health: %d%",health);
    TextDrawSetString(Health, h);


    return 1;
    }

    forward payday(playerid);


    SetTimer("payday",360000,1);


    public payday()
    {
    for(new i=0; i<MAX_PLAYERS;i++)
    {
    new PlayerScore = GetPlayerScore(i);
    if(PlayerScore < 0)
    {
    GivePlayerMoney(i,5000);
    SetPlayerScore(i,GetPlayerScore(i)+1);
    GameTextForPlayer(i,"Payday",5000,1);
    GivePlayerMoney(i,-200);
    SendClientMessage(i,0xFFFF00FF,"-----Payday-----");
    SendClientMessage(i,0xFFFF00FF,"Score: 1");
    SendClientMessage(i,0xFFFF00FF,"Verdienst: $5000");
    SendClientMessage(i,0xFFFF00FF,"Stromkosten: 200$");
    return 1;
    }
    else if(PlayerScore <1 )
    {
    GivePlayerMoney(i,10000);
    SetPlayerScore(i,GetPlayerScore(i)+1);
    GivePlayerMoney(i,-200);
    GameTextForPlayer(i,"Payday",5000,1);
    SendClientMessage(i,0xFFFF00FF,"-----Payday-----");
    SendClientMessage(i,0xFFFF00FF,"Score: 2-3");
    SendClientMessage(i,0xFFFF00FF,"Verdienst: $10000");
    SendClientMessage(i,0xFFFF00FF,"Stromkosten: 200$");
    return 1;
    }
    else if(PlayerScore <3 )
    {
    SetPlayerScore(i,GetPlayerScore(i)+1);
    GivePlayerMoney(i,25000);
    GivePlayerMoney(i,-200);
    GameTextForPlayer(i,"Payday",5000,1);
    SendClientMessage(i,0xFFFF00FF,"-----Payday-----");
    SendClientMessage(i,0xFFFF00FF,"Score: 4-6");
    SendClientMessage(i,0xFFFF00FF,"Verdienst: $25000");
    SendClientMessage(i,0xFFFF00FF,"Stromkosten: 200$");
    return 1;
    }
    else if(PlayerScore <6)
    {
    GivePlayerMoney(i,-200);
    SetPlayerScore(i,GetPlayerScore(i)+1);
    GivePlayerMoney(i,50000);
    GameTextForPlayer(i,"Payday",5000,1);
    SendClientMessage(i,0xFFFF00FF,"-----Payday-----");
    SendClientMessage(i,0xFFFF00FF,"Score: 7-9");
    SendClientMessage(i,0xFFFF00FF,"Verdienst: $50000");
    SendClientMessage(i,0xFFFF00FF,"Stromkosten: 200$");
    return 1;
    }
    else if(PlayerScore <9 )
    {
    GivePlayerMoney(i,-200);
    SetPlayerScore(i,GetPlayerScore(i)+1);
    GivePlayerMoney(i,100000);
    GameTextForPlayer(i,"Payday",5000,1);
    SendClientMessage(i,0xFFFF00FF,"-----Payday-----");
    SendClientMessage(i,0xFFFF00FF,"Score: 10-~");
    SendClientMessage(i,0xFFFF00FF,"Verdienst: $100000");
    SendClientMessage(i,0xFFFF00FF,"Stromkosten: 200$");
    return 1;
    }
    }
    return 1;
    }


    :D Aus meinem GM

    Du musst strtok erstmal definieren!


    strtok(const string[], &index)
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
    index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }

    probier so:


    public OnPlayerSpawn(playerid)
    {


    SendClientMessage(playerid, COLOR_TOMATO,"|____ Crash Curs Tutorial ____|");
    SendClientMessage(playerid, COLOR_YELLOW, "1. Sei immer nett und behalte ein Reallife Artiges Klima");
    SendClientMessage(playerid, COLOR_YELLOW, "2. Spiele Reallife wenn du Reallife Spielen willst! Wenn nicht verlasse den Server wieder");
    SendClientMessage(playerid, COLOR_YELLOW, "3. Sei zu den Admins und Spieler immer Höflich und verhalte dich Respekt voll");
    SendClientMessage(playerid, COLOR_YELLOW, "4. Cheate nicht oder Beleidige andere User! Mache auch kein Drive By");
    SendClientMessage(playerid, COLOR_YELLOW, "5. Habe immer Spass beim Spielen");
    SendClientMessage(playerid, COLOR_YELLOW, "6. Mache keine Fremd Server Werbung. Weder für uns noch für andere Server");

    return 1;

    if(bool:Locked[playerid] == true) //wenn der Spieler den geschlossen skin nimmt
    {
    SetPlayerHealth(playerid, 0.0);
    ForceClassSelection(playerid); //schickt ihn zurück zur Skin auswahl


    }
    else
    {

    return 1;
    }






    machs doch mit Menü, sieht cooler aus!


    new englisch[MAX_PLAYERS];
    new deutsch[MAX_PLAYERS];
    new Menu:Sprache;


    Sprache = CreateMenu("Sprache",2, 200.0, 100.0, 150.0, 150.0); //Der Name
    AddMenuItem(Sprache,0, "Deutsch");
    AddMenuItem(Sprache,0, "English");


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Menu:CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == Sprache)
    {
    switch(row)
    {
    case 0: //Deutsch
    {
    HideMenuForPlayer(Sprache, playerid);
    SendClientMessage(playerid, Farbe, "Sprache auf Deutsch umgestellt");
    deutsch[playerid] = 1;
    }
    case 1: //Englisch
    {
    HideMenuForPlayer(Sprache, playerid);
    SendClientMessage(playerid, Farbe, "Set language to English");
    englisch[playerid] = 1;


    }


    }
    }



    return 0;
    }


    Dann halt bei OnPlayerSpawn


    ShowMenuForPlayer(Sprache, playerid);


    dann auch noch wie Weed sagte mit dem Abfragen z.b. /help mit 2 Sachen


    if(strcmp("/help",cmdtext,true) == 0)
    {
    if(deutsch(playerid) = 1)
    {
    SendClientMessage(playerid,0x00FF00FF,"------Hilfe des Servers------");
    }
    else if(englisch(playerid) = 1)
    {
    SendClientMessage(playerid,0xFF0000FF,"-------Server Help------");
    }
    return 1;
    }


    MfG

    es ist richtig so


    mach dann bei OnPlayerSpawn dat hin:



    if(bool:Locked[playerid] == true) //wenn der Spieler den geschlossen skin nimmt
    {
    SetPlayerHealth(playerid, 0.0);
    ForceClassSelection(playerid); //schickt ihn zurück zur Skin auswahl

    }
    else
    {
    return 1;
    }
    }