Fresh_Stream |
Дата: Суббота, 30.04.2016, 16:10 | Сообщение # 1
|
Боец
Сообщений: 129
Статус: Offline
|
Представляю вашему вниманию систему Satiety
к всем new
Код new PlayerText:Sat[4][MAX_PLAYERS];
в pInfo
в OnPlayerSpawn(playerid);
Код Satiety(playerid); contimer[playerid] = SetTimerEx("Cycle",1000,true,"i",playerid);
в OnPlayerDisconnect(playerid,reason)
Код KillTimer(contimer[playerid]);
к всем stock
Код stock Satiety(playerid) { new string[10]; format(string, sizeof(string),"%d/100",PlayerInfo[playerid][pEat]); Sat[0][playerid] = CreatePlayerTextDraw(playerid, 608.666625, 118.637054, string); PlayerTextDrawLetterSize(playerid, Sat[0][playerid], 0.449999, 1.600000); PlayerTextDrawAlignment(playerid, Sat[0][playerid], 3); PlayerTextDrawColor(playerid, Sat[0][playerid], -5963521); PlayerTextDrawSetShadow(playerid, Sat[0][playerid], 0); PlayerTextDrawSetOutline(playerid, Sat[0][playerid], 1); PlayerTextDrawBackgroundColor(playerid, Sat[0][playerid], 51); PlayerTextDrawFont(playerid, Sat[0][playerid], 3); PlayerTextDrawSetProportional(playerid, Sat[0][playerid], 1); format(string, sizeof(string),"%d/100",PlayerInfo[playerid][pDrink]); Sat[1][playerid] = CreatePlayerTextDraw(playerid, 608.666625, 139.792617, string); PlayerTextDrawLetterSize(playerid, Sat[1][playerid], 0.449999, 1.600000); PlayerTextDrawAlignment(playerid, Sat[1][playerid], 3); PlayerTextDrawColor(playerid, Sat[1][playerid], 16777215); PlayerTextDrawSetShadow(playerid, Sat[1][playerid], 0); PlayerTextDrawSetOutline(playerid, Sat[1][playerid], 1); PlayerTextDrawBackgroundColor(playerid, Sat[1][playerid], 51); PlayerTextDrawFont(playerid, Sat[1][playerid], 3); PlayerTextDrawSetProportional(playerid, Sat[1][playerid], 1);
Sat[2][playerid] = CreatePlayerTextDraw(playerid, 522.999938, 109.511070, "Pizza"); PlayerTextDrawLetterSize(playerid, Sat[2][playerid], 0.000000, 0.000000); PlayerTextDrawTextSize(playerid, Sat[2][playerid], 30.000000, 30.000000); PlayerTextDrawAlignment(playerid, Sat[2][playerid], 1); PlayerTextDrawColor(playerid, Sat[2][playerid], -1); PlayerTextDrawUseBox(playerid, Sat[2][playerid], true); PlayerTextDrawBoxColor(playerid, Sat[2][playerid], 0); PlayerTextDrawSetShadow(playerid, Sat[2][playerid], 0); PlayerTextDrawSetOutline(playerid, Sat[2][playerid], 0); PlayerTextDrawFont(playerid, Sat[2][playerid], 5); PlayerTextDrawSetPreviewModel(playerid, Sat[2][playerid], 2702); PlayerTextDrawSetPreviewRot(playerid, Sat[2][playerid], 0.000000, -90.000000, 90.000000, 1.000000); PlayerTextDrawBackgroundColor(playerid, Sat[2][playerid],0xffffff00);
Sat[3][playerid] = CreatePlayerTextDraw(playerid, 524.333679, 131.911193, "Drink"); PlayerTextDrawLetterSize(playerid, Sat[3][playerid], 0.000000, 0.000000); PlayerTextDrawTextSize(playerid, Sat[3][playerid], 30.000000, 30.000000); PlayerTextDrawAlignment(playerid, Sat[3][playerid], 1); PlayerTextDrawColor(playerid, Sat[3][playerid], -1); PlayerTextDrawUseBox(playerid, Sat[3][playerid], true); PlayerTextDrawBoxColor(playerid, Sat[3][playerid], 0); PlayerTextDrawSetShadow(playerid, Sat[3][playerid], 0); PlayerTextDrawSetOutline(playerid, Sat[3][playerid], 0); PlayerTextDrawFont(playerid, Sat[3][playerid], 5); PlayerTextDrawSetPreviewModel(playerid, Sat[3][playerid], 19823); PlayerTextDrawSetPreviewRot(playerid, Sat[3][playerid], 0.000000, 0.000000, 0.000000, 1.000000); PlayerTextDrawBackgroundColor(playerid, Sat[3][playerid],0xffffff00); for(new i = 0;i < 4;i++) PlayerTextDrawShow(playerid, Sat[i][playerid]); }
В конец мода
Код forward Cycle(); public Cycle() { new string[10]; PlayerInfo[playerid][pEat] -= 1; PlayerInfo[playerid][pDrink] -= 1; format(string, sizeof(string),"%d/100",PlayerInfo[playerid][pEat]); PlayerTextDrawSetString(playerid, Sat[0][playerid],string); format(string, sizeof(string),"%d/100",PlayerInfo[playerid][pDrink]); PlayerTextDrawSetString(playerid, Sat[1][playerid],string); if(PlayerInfo[playerid][pEat] > 100 || PlayerInfo[playerid][pDrink] > 100) { PlayerInfo[playerid][pEat] = 100;PlayerInfo[playerid][pDrink] = 100; ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 4.1, 0, 0, 0, 0, 0); } return 1; }
ДОПОЛНИТЕЛЬНО
Если Satiety быстро тратиться просто в contimer[playerid] = SetTimerEx("Cycle",1000,true,"i",playerid);который находиться в OnPlayerSpawn вместо 1000 установите своё время
Если вам не нравиться что после 100 вашего персонажа тошнит, просто уберите строку ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 4.1, 0, 0, 0, 0, 0);
Если у вас есть закусочная то, при покупке еды или воды добавьте следующие строки
Код PlayerInfo[playerid][pEat] += 25;//+25 к Еде PlayerInfo[playerid][pDrink] += 10;// +10 к Воде Сколько будет добавляться еды и воды настройте под себя
Автор: Fresh Channel
FCS
Работы: [Урок]Система Satiety - http://cheat-master.ru/forum/117-584800-1 [Command]Снять одежду - http://cheat-master.ru/forum/124-567074-1 [FS]Admin Helper - http://cheat-master.ru/forum/122-589828-1 [PWN]new.pwn со всеми пабликами - http://cheat-master.ru/forum/125-718522-1
Сообщение отредактировал Fresh_Stream - Воскресенье, 01.05.2016, 22:25 |
|
|
|
Fresh_Stream |
Дата: Суббота, 30.04.2016, 20:48 | Сообщение # 3
|
Боец
Сообщений: 129
Статус: Offline
|
Wast-[CM], Okay, но для новичков сойдёт, просто копировать и вставить
FCS
Работы: [Урок]Система Satiety - http://cheat-master.ru/forum/117-584800-1 [Command]Снять одежду - http://cheat-master.ru/forum/124-567074-1 [FS]Admin Helper - http://cheat-master.ru/forum/122-589828-1 [PWN]new.pwn со всеми пабликами - http://cheat-master.ru/forum/125-718522-1
Сообщение отредактировал Fresh_Stream - Суббота, 30.04.2016, 21:03 |
|
|
|
Chio_Rio |
Дата: Понедельник, 11.07.2016, 18:32 | Сообщение # 8
|
Боец
Сообщений: 84
Статус: Offline
|
C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(695) : error 017: undefined symbol "contimer" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(695) : warning 215: expression has no effect C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(695) : error 001: expected token: ";", but found "]" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(695) : error 029: invalid expression, assumed zero C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(695) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
В чем проблема??Добавлено (11.07.2016, 18:32) --------------------------------------------- Contimer исправил, а щас вот: C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1749) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1750) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1751) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1752) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1753) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1754) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1755) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1757) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1757) : error 017: undefined symbol "playerid" C:\Users\decoer\Desktop\ArlenRpByTupac\gamemodes\ArlenRp.pwn(1758) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
10 Errors.
Приму в дар Аккаунты SAMP/Логи/Купоны
|
|
|
|