Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-10-24, 21:56


R_D_U







Wiek: 29
Na forum: 5313 dni
Posty: 78
Nick w MP: R_D_U

Piwa: 194

Respekt: 61,5

Witam czy m?g? by mi kto? napisa? prosty skrypt expa jak a mapie PP albo chocia? go wyci???? to nie udaje mi si? do napisa?
Za pomoc :piwo: :piwo: :piwo:

Podpis
Przyjmuję zlecenia na panele graczy adminów
http://gtao.pl/oferuje-na...2710.htm#518583
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-26, 23:02


Bartek23071993

WiceWersa






Wiek: 29
Na forum: 5223 dni
Posty: 250
Nick w MP: WiceWersa

Piwa: 2429

Respekt: 70

Ostrzeżeń: 20%
Mog? da? Ci kilka wskaz?wek je?li chodzi o PP

Poszukaj:

Kod:



Player[playerid][Exp]
Player[playerid][Level]

stock GetPlayerLevel(PlayerId)
{
new Lvl;
do {
Lvl++;
} while(Lvl*Lvl*6 < Player[PlayerId][Exp]);
return (Lvl-1 < 1) ? 1 : Lvl-1;
}

stock GetPlayerNextExp(PlayerId)
{
return (Player[PlayerId][Level]+1)*(Player[PlayerId][Level]+1)*6;
}



Reszt? szukaj wed?ug tego kodu.
Dalej powiniene? si? po?apa? jak to wyci??. Gdzie? mia?em ten skrypt, je?eli go znajd? to wy?le.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-28, 20:09


Sillence







Wiek: 26
Na forum: 5157 dni
Posty: 1514
Nick w MP: Sillence

Piwa: 1517

Respekt: 416,3
Respekt: 416,3

To ma by? wszystko w textdrawach ?

Ostatnio zmieniony przez Sillence 2012-10-28, 20:21, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-28, 20:19


R_D_U







Wiek: 29
Na forum: 5313 dni
Posty: 78
Nick w MP: R_D_U

Piwa: 194

Respekt: 61,5

Exp: 40/100 Level:1 W text drawach

Podpis
Przyjmuję zlecenia na panele graczy adminów
http://gtao.pl/oferuje-na...2710.htm#518583
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-28, 20:21


Sillence







Wiek: 26
Na forum: 5157 dni
Posty: 1514
Nick w MP: Sillence

Piwa: 1517

Respekt: 416,3
Respekt: 416,3

Pawn
    /*======================FUNCTION================================================
            - SetPlayerExp(playerid, exp)
            - GivePlayerExp(playerid, exp)
            - GetPlayerExp(playerid)
            - SetPlayerLevel(playerid, level)
            - GivePlayerLevel(playerid, level)
            - GetPlayerLevel(playerid)
            - Payday(playerid)
    ==============================================================================*/
     
    #include <a_samp>
    #include <dini>
    #include <sscanf2>
     
    #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
     
    #define Green 0x16EB43FF
     
    enum PData
    {
            EXP,
            Level
    };
    new PlayerInfo[MAX_PLAYERS][PData];
    new file2[256];
     
    forward Payday(playerid);
     
    public OnFilterScriptInit()
    {
            print("\n==========================================");
            print(" Exp and Level System by Xaviour212 Loaded, T?umaczenie by _FasteR_");
            print("==========================================\n");
        for(new 0MAX_PLAYERSj++)
        {
            SetTimerEx("Payday",1*60*60*1000,true,"i",j);
            }
            return 1;
    }
     
    public OnFilterScriptExit()
    {
            return 1;
    }
     
    public OnPlayerConnect(playerid)
    {
            if(!dini_Exists(PFile(playerid)))
            {
                dini_Create(PFile(playerid));
            }
            else
            {
                SetPlayerScore(playerid0);
                SetPlayerScore(playeridGetPlayerLevel(playerid));
                GivePlayerLevel(playerid1);
            PlayerInfo[playerid][EXP] = GetPlayerExp(playerid);
            PlayerInfo[playerid][Level] = GetPlayerLevel(playerid);
            }
            return 0;
    }
     
    public OnPlayerDeath(playeridkilleridreason)
    {
            new string[256];
            new Xp 5*GetPlayerLevel(killerid);
            GivePlayerExp(killerid200-Xp);
            format(stringsizeof(string), "Zabi?e? {FF0000}%s {16EB43}I dosta?e? {FFFFFF}%d {16EB43}exp"Gn(playerid), 200-Xp);
            SendClientMessage(killeridGreenstring);
        return 1;
    }
     
    public Payday(playerid)
    {
            new Bonus 500*GetPlayerLevel(playerid);
            new string[50];
            GivePlayerMoney(playerid2500+Bonus);
        format(stringsizeof(string), "~w~PayDay! ~n~~g~$%d"2500+Bonus);
        GameTextForPlayer(playeridstring30001);
    }
     
    public OnPlayerCommandText(playeridcmdtext[])
    {
            return 0;
    }
     
    public OnPlayerUpdate(playerid)
    {
            new string[256];
            SetPlayerScore(playeridGetPlayerLevel(playerid));
            if(GetPlayerExp(playerid) >= 1000)
            {
                if(GetPlayerLevel(playerid) <= 40)
                {
                        GivePlayerLevel(playerid1);
                    format(stringsizeof(string), "Gratulacje! Tw?j poziom wzr?s? do {FFFFFF}%d"GetPlayerLevel(playerid));
                    SendClientMessage(playeridGreenstring);
                    GameTextForPlayer(playerid"~n~~n~~n~~n~~n~~n~~n~~w~Pobieranie tablicy punkt?w...",3000,3);
                    GivePlayerExp(playerid, - 1000);
                    }
                    else if(GetPlayerLevel(playerid) >= 40)
                    {
                        SetPlayerExp(playerid1000);
                        SetPlayerLevel(playerid40);
                    }
            }
            if(GetPlayerLevel(playerid) >= 40)
            {
                    format(stringsizeof(string), "Osi?gn??e? maksymalny poziom ;)"GetPlayerLevel(playerid));
            SendClientMessage(playeridGreenstring);
            }
            return 1;
    }
     
    SetPlayerExp(playeridexp)
    {
            dini_IntSet(PFile(playerid), "Exp"exp);
            PlayerInfo[playerid][EXP] = exp;
    }
     
    GivePlayerExp(playeridexp)
    {
        PlayerInfo[playerid][EXP] += exp;
        dini_IntSet(PFile(playerid), "Exp"PlayerInfo[playerid][EXP]);
    }
     
    SetPlayerLevel(playeridlevel)
    {
        PlayerInfo[playerid][Level] = level;
        dini_IntSet(PFile(playerid), "Level"PlayerInfo[playerid][Level]);
    }
     
    GivePlayerLevel(playeridlevel)
    {
        PlayerInfo[playerid][Level] += level;
        dini_IntSet(PFile(playerid), "Level"PlayerInfo[playerid][Level]);
    }
     
    stock GetPlayerExp(playerid) return dini_Int(PFile(playerid), "Exp");
     
    stock GetPlayerLevel(playerid) return dini_Int(PFile(playerid), "Level");
     
    stock Gn(playerid)
    {
            new pname[24];
            GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
            return pname;
    }
     
    stock PFile(playerid)
    {
            format(file2,64,"Users/%s.ini",Gn(playerid));
            return file2;
    }


Mo?e to Ci si? przyda ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-28, 20:25


R_D_U







Wiek: 29
Na forum: 5313 dni
Posty: 78
Nick w MP: R_D_U

Piwa: 194

Respekt: 61,5

Ps. Mo?esz zmienic pisz? w #include <YSI\y_ini>

Podpis
Przyjmuję zlecenia na panele graczy adminów
http://gtao.pl/oferuje-na...2710.htm#518583
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-28, 20:41


Sillence







Wiek: 26
Na forum: 5157 dni
Posty: 1514
Nick w MP: Sillence

Piwa: 1517

Respekt: 416,3
Respekt: 416,3

Nigdy nie u?ywa?em tego include wi?c nie wiem co i jak w nim :|

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-28, 21:27


R_D_U







Wiek: 29
Na forum: 5313 dni
Posty: 78
Nick w MP: R_D_U

Piwa: 194

Respekt: 61,5

Dobra olewam ju? ten exp. Mm pytanie czy wyci?? by? mi z mapy PP Pr?dko?ciomierz?? Pr?bowa?em ale nie z tego. Walne par? piwek.

[ Dodano: 2012-10-28, 21:54 ]
Bo wyciolem to:

Kod:

#include <a_samp>
#include <zcmd>
#include <core>
#include <float>
#include <sscanf2>



new Text:tdVehicleBackground;
new Text:tdVehicleInfo;
new Text:tdVehicleName[MAX_PLAYERS];
new Text:tdVehicleSpeed[MAX_PLAYERS];
new Text:tdVehicleDamage[MAX_PLAYERS];


public OnGameModeInit()
{
tdVehicleBackground = TextDrawCreate(523.000000,334.000000,"~n~");
TextDrawUseBox(tdVehicleBackground,1);
TextDrawBoxColor(tdVehicleBackground,0x00000033);
TextDrawTextSize(tdVehicleBackground,630.000000,-569.000000);
TextDrawFont(tdVehicleBackground,0);
TextDrawBackgroundColor(tdVehicleBackground,0x000000ff);
TextDrawAlignment(tdVehicleBackground,0);
TextDrawLetterSize(tdVehicleBackground,1.000000,9.799999);
TextDrawColor(tdVehicleBackground,0xffffffff);
TextDrawSetOutline(tdVehicleBackground,1);
TextDrawSetProportional(tdVehicleBackground,1);
TextDrawSetShadow(tdVehicleBackground,1);

tdVehicleInfo = TextDrawCreate(527.000000,346.000000,"Predkosc:~n~~n~~n~~n~Stan pojazdu:");
TextDrawAlignment(tdVehicleInfo,0);
TextDrawBackgroundColor(tdVehicleInfo,0x000000ff);
TextDrawSetProportional(tdVehicleInfo,1);
TextDrawLetterSize(tdVehicleInfo,0.299999,1.100000);
TextDrawFont(tdVehicleInfo,1);
TextDrawColor(tdVehicleInfo,0xffffffff);
TextDrawSetShadow(tdVehicleInfo,1);

for(new PlayerId = 0; PlayerId < MAX_PLAYERS; PlayerId++)
{
tdVehicleName[PlayerId] = TextDrawCreate(527.000000, 324.000000, "Pobieram...");
TextDrawBackgroundColor(tdVehicleName[PlayerId], 0x000000ff);
TextDrawAlignment(tdVehicleName[PlayerId], 0);
TextDrawFont(tdVehicleName[PlayerId], 3);
TextDrawSetProportional(tdVehicleName[PlayerId], 1);
TextDrawLetterSize(tdVehicleName[PlayerId], 0.399999, 1.300000);
TextDrawColor(tdVehicleName[PlayerId], 0xffffffff);
TextDrawSetOutline(tdVehicleName[PlayerId], 1);

tdVehicleSpeed[PlayerId] = TextDrawCreate(577.000000, 361.000000, "0 km/h");
TextDrawUseBox(tdVehicleSpeed[PlayerId], 1);
TextDrawBoxColor(tdVehicleSpeed[PlayerId], 0x00000033);
TextDrawTextSize(tdVehicleSpeed[PlayerId], 496.000000, 106.000000);
TextDrawAlignment(tdVehicleSpeed[PlayerId], 2);
TextDrawFont(tdVehicleSpeed[PlayerId], 1);
TextDrawLetterSize(tdVehicleSpeed[PlayerId], 0.399999, 1.300000);
TextDrawBackgroundColor(tdVehicleSpeed[PlayerId], 0x000000ff);
TextDrawColor(tdVehicleSpeed[PlayerId], 0xffffffff);
TextDrawSetShadow(tdVehicleSpeed[PlayerId], 1);
TextDrawSetProportional(tdVehicleSpeed[PlayerId], 1);

tdVehicleDamage[PlayerId] = TextDrawCreate(577.000000, 401.000000, "100 / 100");
TextDrawUseBox(tdVehicleDamage[PlayerId], 1);
TextDrawBoxColor(tdVehicleDamage[PlayerId], 0x00000033);
TextDrawTextSize(tdVehicleDamage[PlayerId], 69.000000, 107.000000);
TextDrawAlignment(tdVehicleDamage[PlayerId], 2);
TextDrawBackgroundColor(tdVehicleDamage[PlayerId], 0x000000ff);
TextDrawFont(tdVehicleDamage[PlayerId], 1);
TextDrawLetterSize(tdVehicleDamage[PlayerId], 0.399999, 1.300000);
TextDrawColor(tdVehicleDamage[PlayerId], 0xffffffff);
TextDrawSetProportional(tdVehicleDamage[PlayerId], 1);
TextDrawSetShadow(tdVehicleDamage[PlayerId], 1);
}
return 1;
}

ShowVehicleTextDrawForPlayer(PlayerId)
{
Player[PlayerId][VehicleTD] = true;
TextDrawShowForPlayer(PlayerId, tdVehicleBackground);
TextDrawShowForPlayer(PlayerId, tdVehicleInfo);
TextDrawShowForPlayer(PlayerId, tdVehicleName[PlayerId]);
TextDrawShowForPlayer(PlayerId, tdVehicleSpeed[PlayerId]);
TextDrawShowForPlayer(PlayerId, tdVehicleDamage[PlayerId]);
}

HideVehicleTextDrawForPlayer(PlayerId)
{
Player[PlayerId][VehicleTD] = false;
TextDrawHideForPlayer(PlayerId, tdVehicleBackground);
TextDrawHideForPlayer(PlayerId, tdVehicleInfo);
TextDrawHideForPlayer(PlayerId, tdVehicleName[PlayerId]);
TextDrawHideForPlayer(PlayerId, tdVehicleSpeed[PlayerId]);
TextDrawHideForPlayer(PlayerId, tdVehicleDamage[PlayerId]);
}

UpdateVehicleTextDrawForPlayer(PlayerId)
{
new String[255];
format(String, sizeof(String), "~r~~h~%s", VehicleNames[GetVehicleModel(GetPlayerVehicleID(PlayerId))-400]);
TextDrawSetString(tdVehicleName[PlayerId], String);
format(String, sizeof(String), "%d km/h", GetPlayerSpeed(PlayerId));
TextDrawSetString(tdVehicleSpeed[PlayerId], String);
Player[PlayerId][VHealth] = GetRealVehicleHealth(PlayerId);
format(String, sizeof(String), "%d / 100", Player[PlayerId][VHealth]);
TextDrawSetString(tdVehicleDamage[PlayerId], String);
}


Ale nie dzia?a.

Podpis
Przyjmuję zlecenia na panele graczy adminów
http://gtao.pl/oferuje-na...2710.htm#518583
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-29, 08:06


Bartek23071993

WiceWersa






Wiek: 29
Na forum: 5223 dni
Posty: 250
Nick w MP: WiceWersa

Piwa: 2429

Respekt: 70

Ostrzeżeń: 20%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-29, 19:10


R_D_U







Wiek: 29
Na forum: 5313 dni
Posty: 78
Nick w MP: R_D_U

Piwa: 194

Respekt: 61,5

Nie ten :(

Podpis
Przyjmuję zlecenia na panele graczy adminów
http://gtao.pl/oferuje-na...2710.htm#518583
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-10-29, 21:44


Sillence







Wiek: 26
Na forum: 5157 dni
Posty: 1514
Nick w MP: Sillence

Piwa: 1517

Respekt: 416,3
Respekt: 416,3

R_D_U, ?ap pr?dko?ciomierz z mapy PP :) Powinno chodzi? :P

Pawn
#include <a_samp>
#include <core>
#include <float>
new Text:tdVehicleBackground;
new Text:tdVehicleInfo;
new Text:tdVehicleName[MAX_PLAYERS];
new Text:tdVehicleSpeed[MAX_PLAYERS];
new Text:tdVehicleDamage[MAX_PLAYERS];
new bool:Player[MAX_PLAYERS];
new nazwypojazdow[212][32]=
{
  "Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana",
  "Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat",
  "Mr Whoopee","BF Injection","Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks",
  "Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral",
  "Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy",
  "Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Harley","RC Baron","RC Raider","Glendale","Oceanic",
  "Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
  "Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher",
  "Virgo","Greenwood","Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa",
  "RC Goblin","Hotring Racer","Hotring Racer","Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike",
  "Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain","Nebula","Majestic","Buccaneer","Shamal","Hydra",
  "FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck","Willard","Forklift","Traktor",
  "Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover","Sadler",
  "Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor",
  "Monster","Monster","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna",
  "Bandito","Freight","Trailer","Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley",
  "Stafford","BF-400","Newsvan","Tug","Trailer","Emperor","Wayfarer","Euros","Hotdog","Club","Trailer","Trailer",
  "Andromeda","Dodo","RC Cam","Launch","LS Police-Car","SF Police-Car","LV Police-Car","Police Rancher","Picador","SWAT Van",
  "Alpha","Phoenix","Glendale","Sadler","Luggage Trailer","Luggage Trailer","Stair Trailer","Boxville","Farm Plow","Utility Trailer"
};
public OnGameModeInit()
{
        SetTimer("UpdateVehicleTextDrawForPlayer",250,1);
        tdVehicleBackground TextDrawCreate(523.000000,334.000000,"~n~");
        TextDrawUseBox(tdVehicleBackground,1);
        TextDrawBoxColor(tdVehicleBackground,0x00000033);
        TextDrawTextSize(tdVehicleBackground,630.000000,-569.000000);
        TextDrawFont(tdVehicleBackground,0);
        TextDrawBackgroundColor(tdVehicleBackground,0x000000ff);
        TextDrawAlignment(tdVehicleBackground,0);
        TextDrawLetterSize(tdVehicleBackground,1.000000,9.799999);
        TextDrawColor(tdVehicleBackground,0xffffffff);
        TextDrawSetOutline(tdVehicleBackground,1);
        TextDrawSetProportional(tdVehicleBackground,1);
        TextDrawSetShadow(tdVehicleBackground,1);
        tdVehicleInfo TextDrawCreate(527.000000,346.000000,"Predkosc:~n~~n~~n~~n~Stan pojazdu:");
        TextDrawAlignment(tdVehicleInfo,0);
        TextDrawBackgroundColor(tdVehicleInfo,0x000000ff);
        TextDrawSetProportional(tdVehicleInfo,1);
        TextDrawLetterSize(tdVehicleInfo,0.299999,1.100000);
        TextDrawFont(tdVehicleInfo,1);
        TextDrawColor(tdVehicleInfo,0xffffffff);
        TextDrawSetShadow(tdVehicleInfo,1);
        for(new PlayerId 0PlayerId MAX_PLAYERSPlayerId++)
        {
          tdVehicleName[PlayerId] = TextDrawCreate(527.000000324.000000"Pobieram...");
          TextDrawBackgroundColor(tdVehicleName[PlayerId], 0x000000ff);
          TextDrawAlignment(tdVehicleName[PlayerId], 0);
          TextDrawFont(tdVehicleName[PlayerId], 3);
          TextDrawSetProportional(tdVehicleName[PlayerId], 1);
          TextDrawLetterSize(tdVehicleName[PlayerId], 0.3999991.300000);
          TextDrawColor(tdVehicleName[PlayerId], 0xffffffff);
          TextDrawSetOutline(tdVehicleName[PlayerId], 1);
          tdVehicleSpeed[PlayerId] = TextDrawCreate(577.000000361.000000"0 km/h");
          TextDrawUseBox(tdVehicleSpeed[PlayerId], 1);
          TextDrawBoxColor(tdVehicleSpeed[PlayerId], 0x00000033);
          TextDrawTextSize(tdVehicleSpeed[PlayerId], 496.000000106.000000);
          TextDrawAlignment(tdVehicleSpeed[PlayerId], 2);
          TextDrawFont(tdVehicleSpeed[PlayerId], 1);
          TextDrawLetterSize(tdVehicleSpeed[PlayerId], 0.3999991.300000);
          TextDrawBackgroundColor(tdVehicleSpeed[PlayerId], 0x000000ff);
          TextDrawColor(tdVehicleSpeed[PlayerId], 0xffffffff);
          TextDrawSetShadow(tdVehicleSpeed[PlayerId], 1);
          TextDrawSetProportional(tdVehicleSpeed[PlayerId], 1);
          tdVehicleDamage[PlayerId] = TextDrawCreate(577.000000401.000000"100 / 100");
          TextDrawUseBox(tdVehicleDamage[PlayerId], 1);
          TextDrawBoxColor(tdVehicleDamage[PlayerId], 0x00000033);
          TextDrawTextSize(tdVehicleDamage[PlayerId], 69.000000107.000000);
          TextDrawAlignment(tdVehicleDamage[PlayerId], 2);
          TextDrawBackgroundColor(tdVehicleDamage[PlayerId], 0x000000ff);
          TextDrawFont(tdVehicleDamage[PlayerId], 1);
          TextDrawLetterSize(tdVehicleDamage[PlayerId], 0.3999991.300000);
          TextDrawColor(tdVehicleDamage[PlayerId], 0xffffffff);
          TextDrawSetProportional(tdVehicleDamage[PlayerId], 1);
          TextDrawSetShadow(tdVehicleDamage[PlayerId], 1);
        }
        return 1;
}
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
        ShowVehicleTextDrawForPlayer(playerid);
        return 1;
}
public OnPlayerExitVehicle(playeridvehicleid)
{
        HideVehicleTextDrawForPlayer(playerid);
        return 1;
}
forward ShowVehicleTextDrawForPlayer(playerid);
public ShowVehicleTextDrawForPlayer(playerid)
{
        Player[playerid] = true;
        TextDrawShowForPlayer(playeridtdVehicleBackground);
        TextDrawShowForPlayer(playeridtdVehicleInfo);
        TextDrawShowForPlayer(playeridtdVehicleName[playerid]);
        TextDrawShowForPlayer(playeridtdVehicleSpeed[playerid]);
        TextDrawShowForPlayer(playeridtdVehicleDamage[playerid]);
        return 1;
}
forward HideVehicleTextDrawForPlayer(playerid);
public HideVehicleTextDrawForPlayer(playerid)
{
        Player[playerid] = false;
        TextDrawHideForPlayer(playeridtdVehicleBackground);
        TextDrawHideForPlayer(playeridtdVehicleInfo);
        TextDrawHideForPlayer(playeridtdVehicleName[playerid]);
        TextDrawHideForPlayer(playeridtdVehicleSpeed[playerid]);
        TextDrawHideForPlayer(playeridtdVehicleDamage[playerid]);
}
forward UpdateVehicleTextDrawForPlayer(playerid);
public UpdateVehicleTextDrawForPlayer(playerid)
{
        new String[255],Float:lPojazdHP,lPojazd=GetPlayerVehicleID(playerid);
        GetVehicleHealth(GetPlayerVehicleID(playerid),lPojazdHP);
        lPojazdHP floatsub(lPojazdHP250.0);
        format(Stringsizeof(String), "~r~~h~%s"GetVehicleName(lPojazd));
        TextDrawSetString(tdVehicleName[playerid], String);
        format(Stringsizeof(String), "%d km/h"GetPlayerSpeed(playerid));
        TextDrawSetString(tdVehicleSpeed[playerid], String);
        format(Stringsizeof(String), "%.0f / 100", (lPojazdHP/750)*100);
        TextDrawSetString(tdVehicleDamage[playerid], String);
}
stock GetVehicleName(vehicleid)
{
        new tmp GetVehicleModel(vehicleid) - 400;
        return nazwypojazdow[tmp];
}
stock GetPlayerSpeed(playerid)// km/h by destroyer
{
        new Float:x,Float:y,Float:z,Float:predkosc;
        if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z); else GetPlayerVelocity(playerid,x,y,z);
        predkosc=floatsqroot((x*x)+(y*y)+(z*z))*198;
        return floatround(predkosc);
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-10, 19:12


R_D_U







Wiek: 29
Na forum: 5313 dni
Posty: 78
Nick w MP: R_D_U

Piwa: 194

Respekt: 61,5

A jednak.

Od?wierzam nadal szukam exp/level

Podpis
Przyjmuję zlecenia na panele graczy adminów
http://gtao.pl/oferuje-na...2710.htm#518583
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-11, 13:06


Adrianek1







Wiek: 36
Na forum: 4958 dni
Posty: 136
Nick w MP: Forcer

Piwa: 1434

Respekt: 37,1

Pobierasz mape POPGM wchodzisz w pawno includy POP systemleveli i masz wszystko trzeba tylko ruszy? g?ow?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-11-11, 19:38


R_D_U







Wiek: 29
Na forum: 5313 dni
Posty: 78
Nick w MP: R_D_U

Piwa: 194

Respekt: 61,5

No spoko jest co? takiego:

Pawn
new Level[MAX_PLAYERS];
new Text:LevelekUP;
#define LEVEL_UP_TIME 10

LevelUpFunkcja(playerid)
{

    TextDrawShowForPlayer(playeridLevelekUP);
    PlayerPlaySound(playerid1183,0.0,0.0,0.0);
    Level[playerid] = GetPlayerLevel(playerid);
    new String[255];
    format(Stringsizeof(String), "&#8226;&#8226;|Info| Gratulacje! Gracz %s (%d) osi?gn?? %d level."PlayerName(playerid),playeridLevel[playerid]);
    SendClientMessageToAll(C_ORANGEString);
    SetTimerEx("InfoLevelEnd"10000false"d"playerid);
}
    
forward InfoLevelEnd(playerid);
public InfoLevelEnd(playerid)
{
    TextDrawHideForPlayer(playeridLevelekUP);
    PlayerPlaySound(playerid11840.00.00.0);
    return 1;
}

ControlLevelUp(playerid)
{
    if(Level[playerid] < GetPlayerLevel(playerid))
        LevelUpFunkcja(playerid);
}

stock GetPlayerLevel(playerid)
{
    new Lvl;
    do {
        Lvl++;
    } while(Lvl*Lvl*Respekt[playerid]);
    return (Lvl-1) ? Lvl-1;
}

stock GetPlayerNextExp(playerid)
{
    return (Level[playerid]+1)*(Level[playerid]+1)*6;
}


Ale nic nie widz? na serwerze co do tego trzeba??

Podpis
Przyjmuję zlecenia na panele graczy adminów
http://gtao.pl/oferuje-na...2710.htm#518583
Postaw piwo autorowi tego posta
 

 
Tagi: exp/level :: system
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [DM] Exp/Level System Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku