Причем тут a_samp
[ Scr ][ GF ]
Система прокачки скилов как на SAMP-RP
#14
Отправлено 01 февраля 2012 - 14:59
Цитата
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
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
#15
Отправлено 27 июля 2012 - 22:23
Все сделал, все компилируется, все работает.
Только одно но, как сделать чтоб персонаж не ходил во время стрельбы(Когда у него еще не 100%-ое владение оружием), а чтоб начал ходить, только после 100%-ой прокачки оружия.
Только одно но, как сделать чтоб персонаж не ходил во время стрельбы(Когда у него еще не 100%-ое владение оружием), а чтоб начал ходить, только после 100%-ой прокачки оружия.
#16
Отправлено 22 февраля 2013 - 22:15
немного другая система на другом форуме нашёл ссылку не кину
Дефайны для регулировки кол - ва патронов, которые надо вытреить чтобы прокачать 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;
#19
Отправлено 04 июля 2013 - 23:34
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.
Подскажите как исправить
#20
Отправлено 18 октября 2014 - 12:14
сорри Romzes за -,я плюс тебе поставил,очень понравилось поставил на new.pwn и робит!
Вход
Регистрация
Помощь














