Peršokti į turinį
Admin_Norbe

Problema OnPlayerSpawn

Recommended Posts

Labas vakaras,liaudis :),yra problemėlė,kad yra nustatytą kad kai užsiregistruoji tau būtų suteikiama 450xp,bet kartais duoda ir 200xp,kur čia klaidą yra ? padėjusiam +repu uždėsiu. P.S Būna dažniausiai taip,kad kai užsiregistruoju duoda 450XP ir po 30-50sec pasidaro 200xp 

 

public OnPlayerSpawn(playerid)
{
    AntiCheat[playerid][CanCheckHP]=false;

    AC_SetPlayerHealth(playerid, 99.9);

    WeaponTimer[playerid]=SetTimerEx("AntiGun",5000,false,"i",playerid);
    AntiCheat[playerid][CanCheck]=false;

    ResetPlayerWeapons(playerid);

    AntiCheat[playerid][Melee]=0;                 AntiCheat[playerid][Thrown]=0;
    AntiCheat[playerid][ThrownAmmo]=0;             AntiCheat[playerid][Pistols]=0;
    AntiCheat[playerid][PistolsAmmo]=0;         AntiCheat[playerid][Shotguns]=0;
    AntiCheat[playerid][ShotgunsAmmo]=0;        AntiCheat[playerid][SubMachine]=0;
    AntiCheat[playerid][SubMachineAmmo]=0;        AntiCheat[playerid][Assault]=0;
     AntiCheat[playerid][AssaultAmmo]=0;         AntiCheat[playerid][Rifles]=0;
       AntiCheat[playerid][RiflesAmmo]=0;             AntiCheat[playerid][Heavy]=0;
      AntiCheat[playerid][HeavyAmmo]=0;             AntiCheat[playerid][Handheld]=0;
    AntiCheat[playerid][HandheldAmmo]=0;

    for(new i=0; i < sizeof(ZoneInfo); i++)
    {
        GangZoneShowForPlayer(playerid, ZoneID, GetTeamZoneColor(ZoneInfo[zTeam]));
        if(ZoneAttacker != -1) GangZoneFlashForPlayer(playerid, ZoneID, GetTeamZoneColor(ZoneAttacker));
    }

    PreloadAnimLib(playerid, "AIRPORT");
    PreloadAnimLib(playerid, "ATTRACTORS");
    PreloadAnimLib(playerid, "BAR");
    PreloadAnimLib(playerid, "BASEBALL");
    PreloadAnimLib(playerid, "BD_FIRE");
    PreloadAnimLib(playerid, "BEACH");
    PreloadAnimLib(playerid, "BENCHPRESS");
    PreloadAnimLib(playerid, "BF_INJECTION");
    PreloadAnimLib(playerid, "BIKED");
    PreloadAnimLib(playerid, "BIKEH");
    PreloadAnimLib(playerid, "BIKELEAP");
    PreloadAnimLib(playerid, "BIKES");
    PreloadAnimLib(playerid, "BIKEV");
    PreloadAnimLib(playerid, "BIKE_DBZ");
    PreloadAnimLib(playerid, "BMX");
    PreloadAnimLib(playerid, "BOMBER");
    PreloadAnimLib(playerid, "BOX");
    PreloadAnimLib(playerid, "BSKTBALL");
    PreloadAnimLib(playerid, "BUDDY");
    PreloadAnimLib(playerid, "BUS");
    PreloadAnimLib(playerid, "CAMERA");
    PreloadAnimLib(playerid, "CAR");
    PreloadAnimLib(playerid, "CARRY");
    PreloadAnimLib(playerid, "CAR_CHAT");
    PreloadAnimLib(playerid, "CASINO");
    PreloadAnimLib(playerid, "CHAINSAW");
    PreloadAnimLib(playerid, "CHOPPA");
    PreloadAnimLib(playerid, "CLOTHES");
    PreloadAnimLib(playerid, "COACH");
    PreloadAnimLib(playerid, "COLT45");
    PreloadAnimLib(playerid, "COP_AMBIENT");
    PreloadAnimLib(playerid, "COP_DVBYZ");
    PreloadAnimLib(playerid, "CRACK");
    PreloadAnimLib(playerid, "CRIB");
    PreloadAnimLib(playerid, "DAM_JUMP");
    PreloadAnimLib(playerid, "DANCING");
    PreloadAnimLib(playerid, "DEALER");
    PreloadAnimLib(playerid, "DILDO");
    PreloadAnimLib(playerid, "DODGE");
    PreloadAnimLib(playerid, "DOZER");
    PreloadAnimLib(playerid, "DRIVEBYS");
    PreloadAnimLib(playerid, "FAT");
    PreloadAnimLib(playerid, "FIGHT_B");
    PreloadAnimLib(playerid, "FIGHT_C");
    PreloadAnimLib(playerid, "FIGHT_D");
    PreloadAnimLib(playerid, "FIGHT_E");
    PreloadAnimLib(playerid, "FINALE");
    PreloadAnimLib(playerid, "FINALE2");
    PreloadAnimLib(playerid, "FLAME");
    PreloadAnimLib(playerid, "FLOWERS");
    PreloadAnimLib(playerid, "FOOD");
    PreloadAnimLib(playerid, "FREEWEIGHTS");
    PreloadAnimLib(playerid, "GANGS");
    PreloadAnimLib(playerid, "GHANDS");
    PreloadAnimLib(playerid, "GHETTO_DB");
    PreloadAnimLib(playerid, "GOGGLES");
    PreloadAnimLib(playerid, "GRAFFITI");
    PreloadAnimLib(playerid, "GRAVEYARD");
    PreloadAnimLib(playerid, "GRENADE");
    PreloadAnimLib(playerid, "GYMNASIUM");
    PreloadAnimLib(playerid, "HAIRCUTS");
    PreloadAnimLib(playerid, "HEIST9");
    PreloadAnimLib(playerid, "INT_HOUSE");
    PreloadAnimLib(playerid, "INT_OFFICE");
    PreloadAnimLib(playerid, "INT_SHOP");
    PreloadAnimLib(playerid, "JST_BUISNESS");
    PreloadAnimLib(playerid, "KART");
    PreloadAnimLib(playerid, "KISSING");
    PreloadAnimLib(playerid, "KNIFE");
    PreloadAnimLib(playerid, "LAPDAN1");
    PreloadAnimLib(playerid, "LAPDAN2");
    PreloadAnimLib(playerid, "LAPDAN3");
    PreloadAnimLib(playerid, "LOWRIDER");
    PreloadAnimLib(playerid, "MD_CHASE");
    PreloadAnimLib(playerid, "MD_END");
    PreloadAnimLib(playerid, "MEDIC");
    PreloadAnimLib(playerid, "MISC");
    PreloadAnimLib(playerid, "MTB");
    PreloadAnimLib(playerid, "MUSCULAR");
    PreloadAnimLib(playerid, "NEVADA");
    PreloadAnimLib(playerid, "ON_LOOKERS");
    PreloadAnimLib(playerid, "OTB");
    PreloadAnimLib(playerid, "PARACHUTE");
    PreloadAnimLib(playerid, "PARK");
    PreloadAnimLib(playerid, "PAULNMAC");
    PreloadAnimLib(playerid, "PED");
    PreloadAnimLib(playerid, "PLAYER_DVBYS");
    PreloadAnimLib(playerid, "PLAYIDLES");
    PreloadAnimLib(playerid, "POLICE");
    PreloadAnimLib(playerid, "POOL");
    PreloadAnimLib(playerid, "POOR");
    PreloadAnimLib(playerid, "PYTHON");
    PreloadAnimLib(playerid, "QUAD");
    PreloadAnimLib(playerid, "QUAD_DBZ");
    PreloadAnimLib(playerid, "RAPPING");
    PreloadAnimLib(playerid, "RIFLE");
    PreloadAnimLib(playerid, "RIOT");
    PreloadAnimLib(playerid, "ROB_BANK");
    PreloadAnimLib(playerid, "ROCKET");
    PreloadAnimLib(playerid, "RUSTLER");
    PreloadAnimLib(playerid, "RYDER");
    PreloadAnimLib(playerid, "SCRATCHING");
    PreloadAnimLib(playerid, "SHAMAL");
    PreloadAnimLib(playerid, "SHOP");
    PreloadAnimLib(playerid, "SHOTGUN");
    PreloadAnimLib(playerid, "SILENCED");
    PreloadAnimLib(playerid, "SKATE");
    PreloadAnimLib(playerid, "SMOKING");
    PreloadAnimLib(playerid, "SNIPER");
    PreloadAnimLib(playerid, "SPRAYCAN");
    PreloadAnimLib(playerid, "STRIP");
    PreloadAnimLib(playerid, "SUNBATHE");
    PreloadAnimLib(playerid, "SWAT");
    PreloadAnimLib(playerid, "SWEET");
    PreloadAnimLib(playerid, "SWIM");
    PreloadAnimLib(playerid, "SWORD");
    PreloadAnimLib(playerid, "TANK");
    PreloadAnimLib(playerid, "TATTOOS");
    PreloadAnimLib(playerid, "TEC");
    PreloadAnimLib(playerid, "TRAIN");
    PreloadAnimLib(playerid, "TRUCK");
    PreloadAnimLib(playerid, "UZI");
    PreloadAnimLib(playerid, "VAN");
    PreloadAnimLib(playerid, "VENDING");
    PreloadAnimLib(playerid, "VORTEX");
    PreloadAnimLib(playerid, "WAYFARER");
    PreloadAnimLib(playerid, "WEAPONS");
    PreloadAnimLib(playerid, "WUZI");
    PreloadAnimLib(playerid, "WOP");
    PreloadAnimLib(playerid, "GFUNK");
    PreloadAnimLib(playerid, "RUNNINGMAN");


    if( IsPlayerNPC(playerid) )
    {
        if(!strcmp(GET_NAME( playerid ), "Devil_Devil", true))
        {
            PutPlayerInVehicle(playerid, NPCTrain, 0);
            return 1;
        }
        return 1;
    }

    if(playerOptions[playerid][TextDrawShow])
    {
        TextDrawShowForPlayer(playerid, LData);
        TextDrawShowForPlayer(playerid, LLaikas);
    }
    TextDrawHideForPlayer(playerid, versionTD);

    if(playerDB[playerid][naujokas])
    {
        SetPlayerInterior               (playerid,0);
        AC_SetPlayerPos                 (playerid,829.8691,-1369.6246,-0.5015);
        AC_TogglePlayerControllable     (playerid, false);
        SetTimerEx                      ("atsaldyt", 3000, 0, "i", playerid);
        playerDB[playerid][*Myliu SuperGames.lt*] = -1861.8365;
        playerDB[playerid][pY] = 54.3248;
        playerDB[playerid][pZ] = 1055.1206;
        SetPlayerFacingAngle            (playerid, 180);
        ResetPlayerMoneyA               (playerid);
        SetPlayerScore                  (playerid,450);
        GivePlayerMoneyA                (playerid, 15000);
        SetPlayerColor                  (playerid,PLAYCOL_HIDDEN);
        AddItemToPlayerInventory        (playerid, ITEM_SANDWITCH, 15);
        AddItemToPlayerInventory        (playerid, ITEM_MINERAL_WATER, 5);
        AddItemToPlayerInventory        (playerid, ITEM_GPS, 1);
        AC_SetPlayerHealth              (playerid, 99.9);
        playerDB[playerid][Alkis]=100;
        playerDB[playerid][Troskulys]=100;
        switch(playerDB[playerid][lytis])
        {
            case 1:
            {
                playerDB[playerid][drabuziai]=20;
                SetPlayerSkin(playerid,playerDB[playerid][drabuziai]);
            }
            default:
            {
                playerDB[playerid][drabuziai]=12;
                SetPlayerSkin(playerid,playerDB[playerid][drabuziai]);
            }
        }
        SetPlayerProgressBarValue(playerid,food[playerid], playerDB[playerid][Alkis]);
        SetPlayerProgressBarValue(playerid,drink[playerid], playerDB[playerid][Troskulys]);
        ShowPlayerProgressBar(playerid, food[playerid]);
        ShowPlayerProgressBar(playerid, drink[playerid]);
        TextDrawShowForPlayer(playerid, newbieusebox);
        TextDrawShowForPlayer(playerid, newbierpg);
        PlayerTextDrawShow(playerid, newbiemission[playerid]);
        playerDB[playerid][authstate]=4;
        playerDB[playerid][leidziamsaugot]=1;
        SetTimerEx("Niewbie",25000,false,"i",playerid);

Redaguota , nario Admin_Norbe
  • Neigiamai 1

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį



3 minutes prieš, Inv1s parašė:

Per paiešką žiūrėk kur prideda 200 XP. Gal tarp kokio OnPlayerConnect ar dar kur įkišta yra esant kažkokiai sąlygai.

Arba + gali kokia gal misija būti kuri įvykdo ir poto duoda + papildomai XP.

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį




prieš 15 valandas(-ų), Inv1s parašė:

Per paiešką žiūrėk kur prideda 200 XP. Gal tarp kokio OnPlayerConnect ar dar kur įkišta yra esant kažkokiai sąlygai.

Ačiū už patarimą.

prieš 14 valandas(-ų), Barz parašė:

Ctrl+f ir ieškok SetPlayerScore(playerid, 200);

Ačiū už pagalbą

prieš 15 valandas(-ų), Inv1s parašė:

Sutvarkytą .

Labas,radau ant OnPlayerConnect šita playerDB[playerid][pXP]=200; EDIT: Išvis nukrito iki 2XP 

Redaguota , nario Admin_Norbe
  • Teigiamai 1

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį


38 minutes prieš, br1tas parašė:

Kokiu būdų pirmoji mintis būna parašyti temą, nei pasinaudoti paieška gamemode'e ir paieškoti kur prideda XP? :D Temą parašyti daugiau laiko sugaišai, nei, kad būtum užtrukęs pasinaudoti paieška...

 

Dėja buvo kitaip užvadinas ne SetPlayerScore tai :)

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį


prieš 7 valandas(-ų), Admin_Norbe parašė:

Dėja buvo kitaip užvadinas ne SetPlayerScore tai :)

Jeigu tau uždeda XP, tai bet kokiu atveju bent jau viena eilute su SetPlayerScore turi būti. Pvz define, stock'e ar dar kažkur, o tada jau ieškai šaknų naudodamasis CTRL + F.  Aš tau pasakysiu daugiau, tu galėsi ištaisyti tokiu būdu daugiau klaidų jeigu pats mąstysi logiškai. :)

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį

Svečias
Ši tema yra užrakinta.

  • Narių peržiūri šį forumą:   0 nariai

    Nėra registruotų narių peržiūrinčių šį forumą.


  • SuperGames programele
  • SuperGames programele


×