Beiträge von theTV

    Hey,
    undzwar wird beim string was nicht angezeigt.



    new string[128];
    case 6: //6 = Bootschein
    {
    new personame[10];
    if(wert<0||wert>1)return SCM(playerid,rot,"Fehler: Es gibt nur 0 und 1");
    SetPVarInt(pID,"Bootschein",wert);
    format(string,sizeof(string),"Du hast den Spieler %s sein Bootschein %s.",SpielerName(pID),personame); //personame wird nicht anzeigt
    SCM(playerid,grün,string);
    switch(wert)
    {
    case 0:{personame="entzogen";}
    case 1:{personame="gegeben";}
    }
    }

    Hey,
    ich wollte Objekte aus dem Gamemode nehmen und in eine Include stecken.


    Hier der Pwn Code:


    Spoiler anzeigen


    #include <a_samp>

    Spoiler anzeigen
    public OnGameModeInit()
    {
    CreateObject(6959, 1229.67, -1310.11, 12.39, 0.00, 0.00, -180.48);
    CreateObject(6959, 1229.60, -1341.20, 12.36, 0.00, 0.00, -180.36);
    CreateObject(6959, 1226.34, -1365.50, 12.25, -0.24, 0.18, -180.48);
    CreateObject(737, 1245.18, -1383.94, 12.33, 0.00, 0.00, 0.00);
    CreateObject(737, 1216.74, -1384.38, 12.42, 0.00, 0.00, 0.00);
    CreateObject(737, 1216.81, -1365.76, 12.33, 0.00, 0.00, 0.00);
    CreateObject(737, 1245.30, -1362.21, 12.42, 0.00, 0.00, 0.00);
    CreateObject(737, 1217.04, -1291.54, 12.63, 0.00, 0.00, 0.00);
    CreateObject(737, 1245.15, -1292.03, 12.63, 0.00, 0.00, 0.00);
    CreateObject(737, 1245.06, -1312.88, 12.44, 0.00, 0.00, 0.00);
    CreateObject(737, 1217.19, -1312.16, 12.57, 0.00, 0.00, 0.00);
    CreateObject(672, 1217.05, -1321.06, 12.95, 0.00, 0.00, 0.00);
    CreateObject(672, 1216.52, -1354.54, 12.95, 0.00, 0.00, 0.00);
    CreateObject(737, 1245.18, -1337.90, 12.42, 0.00, 0.00, 0.00);
    CreateObject(8406, 1215.94, -1335.11, 17.64, 0.00, 0.00, -90.30);
    CreateObject(4638, 1217.75, -1337.63, 14.12, 0.00, 0.00, 0.00);
    CreateObject(8843, 1213.40, -1343.01, 12.19, 0.00, 0.00, -92.28);
    CreateObject(8843, 1213.54, -1332.35, 12.19, 0.00, 0.00, 89.16);
    CreateObject(8673, 1216.13, -1301.07, 13.80, 0.00, 0.00, -90.24);
    CreateObject(8673, 1216.05, -1315.90, 13.80, 0.00, 0.00, -90.24);
    CreateObject(8673, 1215.85, -1359.87, 13.80, 0.00, 0.00, -90.24);
    CreateObject(8673, 1215.85, -1375.16, 13.80, 0.00, 0.00, -89.94);
    CreateObject(8673, 1226.31, -1385.05, 13.80, 0.00, 0.00, 0.60);
    CreateObject(8673, 1235.93, -1384.93, 13.80, 0.00, 0.00, 0.60);
    CreateObject(8673, 1245.95, -1374.37, 13.80, 0.00, 0.00, 89.70);
    CreateObject(8673, 1246.00, -1353.94, 13.80, 0.00, 0.00, 90.00);
    CreateObject(8673, 1245.97, -1333.51, 13.80, 0.00, 0.00, 90.18);
    CreateObject(8673, 1245.89, -1313.08, 13.80, 0.00, 0.00, 90.18);
    CreateObject(8673, 1245.85, -1300.90, 13.80, 0.00, 0.00, 90.18);
    CreateObject(8673, 1235.36, -1290.82, 13.80, 0.00, 0.00, 179.28);
    CreateObject(8673, 1226.12, -1290.73, 13.80, 0.00, 0.00, 179.40);
    CreateObject(10183, 1221.36, -1369.56, 12.37, 0.00, 0.00, -223.80);
    CreateObject(10183, 1241.10, -1363.85, 12.25, 0.00, 0.00, -405.24);
    CreateObject(10183, 1241.22, -1348.77, 12.35, 0.00, 0.00, -405.24);
    CreateObject(10183, 1241.61, -1308.84, 12.39, 0.00, 0.00, -405.24);
    CreateObject(10183, 1221.46, -1305.97, 12.39, 0.00, 0.00, -584.82);
    return 0;
    }


    Allerdings kommt der Error:

    error 021: symbol already defined: "OnGameModeInit"

    hast du auch ein return drinne?



    if(strcmp(cmdtext,"/frc",true)==0)
    {
    if(isPlayerInFrak(playerid,1))
    {
    for(new i=0; i<sizeof(lspdcar); i++)
    {
    SetVehicleToRespawn(i);
    }
    }
    if(isPlayerInFrak(playerid,2))
    {
    for(new i=0; i<sizeof(fbicar); i++)
    {
    SetVehicleToRespawn(i);
    }
    }
    if(isPlayerInFrakt(playerid,3))
    {
    for(new i=0; i<sizeof(gangcar); i++)
    {
    SetVehicleToRespawn(i);
    }
    }
    if(isPlayerInFrakt(playerid,4))
    {
    for(new i=0; i<sizeof(armycar); i++)
    {
    SetVehicleToRespawn(i);
    }
    }
    if(isPlayerInFrakt(playerid,5))
    {
    for(new i=0; i<sizeof(taxicar); i++)
    {
    SetVehicleToRespawn(i);
    }
    }
    if(isPlayerInFrakt(playerid,6))
    {
    for(new i=0; i<sizeof(mediccar); i++)
    {
    SetVehicleToRespawn(i);
    }
    }
    return 1;
    }


    so muss es gehen, das es bei mir so auch klappt

    Hi leute,
    ich will das man dem spieler leben hinzufügt bis 100.
    z.B.: Spieler A hat 57 hp noch und soll pro 1hp Xgeld zahlen bis er 100hp hat.
    wie macht man sowas?


    hab mal nen anfang gemacht

    ocmd:heilen(playerid,params[])
    {
    if(isPlayerInFrakt(playerid,3))//Medic
    {
    new pID;
    new Float:health;
    if(sscanf(params,"u",pID))return SCM(playerid,blau,"/heilen [playerid]");
    if(IsPlayerConnected(pID))
    GetPlayerHealth(pID,health);
    }
    return 1;
    }

    if(dialogid == DIALOG_REGSTEP_3)
    {
    if(response == 1)
    {
    switch (listitem)
    {
    case 0://Los Santos
    {
    new string[128];//vergessen
    PlayerInfo[playerid][pOrigin] = 1;
    SendClientMessage(playerid, COLOR_WHITE, "Oke du Spawnst in Los Santos nun!");
    SendClientMessage(playerid, 0xD70000FF, "====================================");
    SendClientMessage(playerid, COLOR_GREEN, "Dein Account wurde in der Datenbank gespeichert!");
    SendClientMessage(playerid, COLOR_YELLOW, "So, nun folgt das Tutorial!");
    RegistrationStep[playerid] = 0;
    SetPlayerPos(playerid,2393.4358,-1493.5380,58.4495);
    SetPlayerCameraPos(playerid, 2393.4358,-1493.5380,58.4495);
    SetPlayerCameraLookAt(playerid, 2393.4358,-1493.5380,58.4495);
    format(string,sizeof(string),"Willkommen %s, auf unserem Server!\nEs kommt nun ein kleines Tutorial mit Fragen\nWenn du eine sache Falsch beantwortest, wirst du gekickt!/nViel Erfolg beim Tutorial und bei den Fragen!",playerid);
    ShowPlayerDialog(playerid, DIALOG_TUT1, DIALOG_STYLE_MSGBOX, "Einführung", string, "Zur Frage","Abbrechen");



    }


    #define dia_schwarzmarkt 1729
    public OnGameModeInit()
    {
    CreatePickup(1248,2,2873.9116,-2125.0334,4.2440); // GTA III Sign
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/markt", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid,1.0,2873.9116,-2125.0334,4.2440))
    {
    ShowPlayerDialog(playerid,dia_schwarzmarkt,DIALOG_STYLE_LIST,"Schwarzmarkt","M4 500 Schuss 5,400$\nAK47 350 Schuss 4,500$\nDeagle 250Schuss 3,000$\nBaseballschläger 300$\nMP5 600 Schuss 6,800$","Kaufen","Abbrechen");
    }
    return 1;
    }
    return 0;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid==dia_schwarzmarkt)
    {
    if(response)
    {
    if(listitem==0) // M4 500 Schuss 5,400$
    {
    GivePlayerWeapon(playerid,31,500);
    GivePlayerMoney(playerid,-5400);
    }
    if(listitem==1) // AK47 350 Schuss 4,500$
    {
    GivePlayerWeapon(playerid,30,350);
    GivePlayerMoney(playerid,-4500);
    }
    if(listitem==2) // Deagle 250Schuss 3,000$
    {
    GivePlayerWeapon(playerid,24,250);
    GivePlayerMoney(playerid,-3000);
    }
    if(listitem==3) // Baseballschläger 300$
    {
    GivePlayerWeapon(playerid,5,0);
    GivePlayerMoney(playerid,-300);
    }
    if(listitem==4) // MP5 600 Schuss 6,800$
    {
    GivePlayerWeapon(playerid,29,600);
    GivePlayerMoney(playerid,-6800);
    }
    }
    }
    return 1;
    }

    ich glaube das es so geht:

    ocmd:pc(playerid,params[])
    {
    new result[64];
    if(sscanf(params,"s",result))return SendClientMessage(playerid,rot,"/pc [text]");
    for(new i=0; i<GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(SpielerInfo[playerid][pDonateRank] == 0)return SendClientMessage(playerid, COLOR_RED, "Info: Du bist kein Premium User.");
    format(tmp, 128, "[PC]%s: %s.", SpielerName(playerid), result);
    SendPremiumMessage(COLOR_GREEN, result);
    }
    }
    return 1;
    }