Форум Pawn.Wiki - Воплоти мечту в реальность!: Система прокачки скилов как на SAMP-RP - Форум Pawn.Wiki - Воплоти мечту в реальность!

Перейти к содержимому

  • (4 Страниц) +
  • 1
  • 2
  • 3
  • 4
  • Вы не можете создать новую тему
  • Вы не можете ответить в тему

[ Scr ][ GF ]
Система прокачки скилов как на SAMP-RP
Оценка: ***** 1 Голосов

#11
Пользователь офлайн   Rock & Roll 

  • Эксперт
  • Вставить ник
  • Раскрыть информацию
Причем тут a_samp
0

#12
Пользователь офлайн   FingerPro 

  • Пользователь
  • Вставить ник
  • Раскрыть информацию
stock ToDevelopSkills(Slashes,Points)




Куда ее прописывать?
0

#13
Пользователь офлайн   Romzes 

  • ( ^_^ )
  • Вставить ник
  • Раскрыть информацию
В конец мода
1

#14
Пользователь офлайн   FingerPro 

  • Пользователь
  • Вставить ник
  • Раскрыть информацию

Цитата

C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(982) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(1001) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(1012) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2072) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2100) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2101) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2102) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2103) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2104) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2105) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2106) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2115) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2148) : error 017: undefined symbol "SetPlayerArmourAC"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2149) : error 004: function "Delgun" is not implemented
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2154) : error 017: undefined symbol "GiveRichGun"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2183) : error 004: function "FixHour" is not implemented
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2190) : error 017: undefined symbol "SetPlayerHealthAC"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2204) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2219) : error 004: function "Delgun" is not implemented
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2240) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2390) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2622) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2762) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2764) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2775) : error 017: undefined symbol "printr"
C:\Documents and Settings\Сервер\Рабочий стол\Rio-RP\gamemodes\Rio.pwn(2777) : error 004: function "PlayerToPoint" is not implemented



как исправить?)

Кто поможет вставить систему прокачки скилов в мод rls?
Skype: fingepro777
0

#15
Пользователь офлайн   FingerPro 

  • Пользователь
  • Вставить ник
  • Раскрыть информацию
Все сделал, все компилируется, все работает.
Только одно но, как сделать чтоб персонаж не ходил во время стрельбы(Когда у него еще не 100%-ое владение оружием), а чтоб начал ходить, только после 100%-ой прокачки оружия.
0

#16
Пользователь офлайн   -=sergey=- 

  • Местный
  • Вставить ник
  • Раскрыть информацию
немного другая система на другом форуме нашёл ссылку не кину :biggrin:
Дефайны для регулировки кол - ва патронов, которые надо вытреить чтобы прокачать 1 процент
PHP код:
#define Ammo_SDPISTOL 30 //Кол - во, которые надо выстрелить, чтоы прокачать 1 процент
#define Ammo_DEAGLE 24 //Кол - во, которые надо выстрелить, чтоы прокачать 1 процент
#define Ammo_SHOTGUN 15 //Кол - во, которые надо выстрелить, чтоы прокачать 1 процент
#define Ammo_MP5 75 //Кол - во, которые надо выстрелить, чтоы прокачать 1 процент
#define Ammo_AK47 100 //Кол - во, которые надо выстрелить, чтоы прокачать 1 процент
#define Ammo_M4A1 89 //Кол - во, которые надо выстрелить, чтоы прокачать 1 процент  
В енумератор enum pInfo
PHP код:
pGunSkill[6],  
В public OnPlayerRegister
PHP код:
iniSetInt(File,"SDPistol",0);
iniSetInt(File,"DesertEagle",0);
iniSetInt(File,"ShotGun",0);
iniSetInt(File,"MP5",0);
iniSetInt(File,"AK47",0);
iniSetInt(File,"M4",0);  
В public OnPlayerUpdate или типо этого(Сохранение переменных в акаунт)
PHP код:
iniSetInt(File,"SDPistol",PlayerInfo[playerid][pGunSkill][0]);
iniSetInt(File,"DesertEagle",PlayerInfo[playerid][pGunSkill][1]);
iniSetInt(File,"ShotGun",PlayerInfo[playerid][pGunSkill][2]);
iniSetInt(File,"MP5",PlayerInfo[playerid][pGunSkill][3]);
iniSetInt(File,"AK47",PlayerInfo[playerid][pGunSkill][4]);
iniSetInt(File,"M4",PlayerInfo[playerid][pGunSkill][5]);  
В public OnPlayerLogin
PHP код:
iniGetInt(File,"SDPistol",PlayerInfo[playerid][pGunSkill][0]);
iniGetInt(File,"DesertEagle",PlayerInfo[playerid][pGunSkill][1]);
iniGetInt(File,"ShotGun",PlayerInfo[playerid][pGunSkill][2]);
iniGetInt(File,"MP5",PlayerInfo[playerid][pGunSkill][3]);
iniGetInt(File,"AK47",PlayerInfo[playerid][pGunSkill][4]);
iniGetInt(File,"M4",PlayerInfo[playerid][pGunSkill][5]);  
public OnPlayerCommandTExt:
PHP код:
if(strcmp(cmd, "/myskills", true) == 0)
    {
            new stringskill[700];
        new points[6],percent[2] = "%";
        points[0] = 100 - PlayerInfo[playerid][pGunSkill][0];
        points[1] = 100 - PlayerInfo[playerid][pGunSkill][1];
        points[2] = 100 - PlayerInfo[playerid][pGunSkill][2];
        points[3] = 100 - PlayerInfo[playerid][pGunSkill][3];
        points[4] = 100 - PlayerInfo[playerid][pGunSkill][4];
        points[5] = 100 - PlayerInfo[playerid][pGunSkill][5];
         format(stringskill,sizeof(stringskill),"SDPistol:\t[%s]%d%s\nDeagle:\t[%s]%d%s\nShotGun:\t[%s]%d%
s\nMP5\t\t[%s]%d%s\nAK47:\t\t[%s]%d%s\nM4A1:\t\t[%s]%d%s",
         ToDevelopSkills(PlayerInfo[playerid][pGunSkill][0],points[0]),PlayerInfo[playerid][pGunSkill][0]
,percent,
         ToDevelopSkills(PlayerInfo[playerid][pGunSkill][1],points[1]),PlayerInfo[playerid][pGunSkill][1]
,percent,
         ToDevelopSkills(PlayerInfo[playerid][pGunSkill][2],points[2]),PlayerInfo[playerid][pGunSkill][2]
,percent,
         ToDevelopSkills(PlayerInfo[playerid][pGunSkill][3],points[3]),PlayerInfo[playerid][pGunSkill][3]
,percent,
         ToDevelopSkills(PlayerInfo[playerid][pGunSkill][4],points[4]),PlayerInfo[playerid][pGunSkill][4]
,percent,
         ToDevelopSkills(PlayerInfo[playerid][pGunSkill][5],points[5]),PlayerInfo[playerid][pGunSkill][5]
,percent);
         ShowPlayerDialog(playerid,43,DIALOG_STYLE_MSGBOX,"<< Навыки владением оружием>>",stringskill,"Готово","");
        return 1;
}  
Ну и сама функция распознавание прокачки скиллов:
PHP код:
stock ToDevelopSkills(Slashes,Points)
{
    new SlashesAndPoints[400];
    new Slash[2] = "|";
    new Point[2] = "'";
    for(new i = 0; i < Slashes; i++) strcat(SlashesAndPoints, Slash);
    for(new i = 0; i < Points; i++) strcat(SlashesAndPoints, Point);
    return SlashesAndPoints;
}  
В конец мода функцию скиллов игрока
PHP код:
stock SetPlayerSkills(playerid)
{
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, PlayerInfo[playerid][pGunSkill][0]*10);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, PlayerInfo[playerid][pGunSkill][1]*10);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, PlayerInfo[playerid][pGunSkill][2]*10);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, PlayerInfo[playerid][pGunSkill][3]*10);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, PlayerInfo[playerid][pGunSkill][4]*10);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, PlayerInfo[playerid][pGunSkill][5]*10);
    return 1;
}  
В public OnPlayerSpawn в самый конец
PHP код:
SetPlayerSkills(playerid);  
Теперь переменные для отчитывания патронов в самое начало public OnPlayerUpdate
PHP код:
SetPVarInt(playerid, "NewPlayerAmmo", GetPlayerAmmo(playerid));
if(GetPVarInt(playerid, "NewPlayerAmmo") != GetPVarInt(playerid, "PlayerAmmo"))
{
        OnPlayerAmmoChange(playerid, GetPVarInt(playerid, "NewPlayerAmmo"), GetPVarInt(playerid, "PlayerAmmo"));
        SetPVarInt(playerid, "PlayerAmmo", GetPVarInt(playerid, "NewPlayerAmmo"));
 }  
Ну и сам public куда нить тоже в конец мода
PHP код:
stock OnPlayerAmmoChange(playerid, newammo, oldammo)
{
    if(newammo < oldammo)
    {
        switch(GetPlayerWeapon(playerid))
        {
            case 24:
            {
                SetPVarInt(playerid, "SkillD",GetPVarInt(playerid,"SkillD") +1);
                if(GetPVarInt(playerid,"SkillD") >= Ammo_DEAGLE && PlayerInfo[playerid][pGunSkill][1] < 100)
                {
                    PlayerInfo[playerid][pGunSkill][1]++;
                    SetPVarInt(playerid, "SkillD",0);
                }
            }
            case 23:
            {
                SetPVarInt(playerid, "SkillSD",GetPVarInt(playerid,"SkillSD") +1);
                if(GetPVarInt(playerid,"SkillSD")>= Ammo_SDPISTOL && PlayerInfo[playerid][pGunSkill][0] < 100)
                {
                     PlayerInfo[playerid][pGunSkill][0]++;
                     SetPVarInt(playerid, "SkillSD",0);
                }
            }
            case 25:
            {
                SetPVarInt(playerid, "SkillShot",GetPVarInt(playerid,"SkillShot") +1);
                if(GetPVarInt(playerid,"SkillShot") >= Ammo_SHOTGUN && PlayerInfo[playerid][pGunSkill][2] < 100)
                {
                    PlayerInfo[playerid][pGunSkill][2]++;
                    SetPVarInt(playerid, "SkillShot",0);
                }
            }
            case 29:
            {
                SetPVarInt(playerid, "SkillMP5",GetPVarInt(playerid,"SkillMP5") +1);
                if(GetPVarInt(playerid,"SkillMP5") >= Ammo_MP5 && PlayerInfo[playerid][pGunSkill][3] < 100)
                {
                    PlayerInfo[playerid][pGunSkill][3]++;
                    SetPVarInt(playerid, "SkillMP5",0);
                }
            }
            case 30:
            {
                SetPVarInt(playerid, "SkillAk47",GetPVarInt(playerid,"SkillAk47") +1);
                if(GetPVarInt(playerid,"SkillAk47") >= Ammo_AK47 && PlayerInfo[playerid][pGunSkill][4] < 100)
                {
                    PlayerInfo[playerid][pGunSkill][4]++;
                    SetPVarInt(playerid, "SkillAk47",0);
                }
            }
            case 31:
            {
                SetPVarInt(playerid, "SkillM4",GetPVarInt(playerid,"SkillM4") +1);
                if(GetPVarInt(playerid,"SkillM4") >= Ammo_M4A1 && PlayerInfo[playerid][pGunSkill][5] < 100)
                {
                    PlayerInfo[playerid][pGunSkill][5]++;
                    SetPVarInt(playerid, "SkillM4",0);
                }
            }
        }
        SavePlayer(playerid);//замените на свою функцию сохранения
    }
    return 1;
}  
В public OnPlayerConnect:
PHP код:
PlayerInfo[playerid][pGunSkill][0] = 0;
PlayerInfo[playerid][pGunSkill][1] = 0;
PlayerInfo[playerid][pGunSkill][2] = 0;
PlayerInfo[playerid][pGunSkill][3] = 0;
PlayerInfo[playerid][pGunSkill][4] = 0;
PlayerInfo[playerid][pGunSkill][5] = 0; 


#17
Пользователь офлайн   WilliamDoylle 

  • Прохожий
  • Вставить ник
  • Раскрыть информацию
Напиши заново !
0

#18
Пользователь офлайн   Oiki 

  • Местный
  • Вставить ник
  • Раскрыть информацию
new string[1000];

И тут я ***** не понял
0

#19
Пользователь офлайн   000den4ik000 

  • Прохожий
  • Вставить ник
  • Раскрыть информацию
E:\TROL\gta\TROL2\gamemodes\new.pwn(367) : error 012: invalid function call, not a valid address
E:\TROL\gta\TROL2\gamemodes\new.pwn(367) : error 017: undefined symbol "File"
E:\TROL\gta\TROL2\gamemodes\new.pwn(367) : error 029: invalid expression, assumed zero
E:\TROL\gta\TROL2\gamemodes\new.pwn(367) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


Подскажите как исправить :sad:
0

#20
Пользователь офлайн   .evoxxx 

  • Liberty Inc.
  • Вставить ник
  • Раскрыть информацию
сорри Romzes за -,я плюс тебе поставил,очень понравилось поставил на new.pwn и робит!
0

Поделиться темой:


  • (4 Страниц) +
  • 1
  • 2
  • 3
  • 4
  • Вы не можете создать новую тему
  • Вы не можете ответить в тему

1 человек читают эту тему
0 пользователей, 1 гостей, 0 скрытых пользователей


Яндекс.Метрика