Пенсионная система

Уроки по скриптингу

Moderator: SJplayer

Avatar
Topic author
Layk M
Прапорщик
Прапорщик
Posts: 173
With us: 7 years 3 months

Пенсионная система

Post #1by Layk » 4 Jun 2013, 17:09

Пенсионная система для законников


В public OnGameModeInit:

Code: Select all

Create3DTextLabel("{F7FF00}ПОЛУЧЕНИЯ ПЕНСИИ\n\n{00D900}Нажмите: "ALT"\n{FFFFFF}или\n{6495ED}Введите: /pensiya",0xFFFFFFFF,2317.1506,-7.3224,27.8161,15.0,0,0);  


В enum pInfo:

Code: Select all

pPensiya


В public PayDay:

Code: Select all

if(PlayerInfo[i][pMember] != && PlayerInfo[i][pLevel] >= 10) { SendClientMessage(i0xFF8C37AA"Вам начислена пенсия. Получить ее можно в банке"); PlayerInfo[i


В public OnPlayerCommandText:

Code: Select all

if(strcmp(cmdtext"/pensiya"true) == 0
    { 
        if(!
PlayerToPoint(2.0,playerid,2316.6023,-7.2965,26.7422)) return true
        if(
PlayerInfo[playerid][pPensiya] == 0) return ShowPlayerDialog(playerid,6703,DIALOG_STYLE_MSGBOX,"{15FF00}БАНК","{FF0000}На вашем пенсионном счете нет пенсии!","ОК",""); 
        
ApplyAnimation(playerid,"CRIB","CRIB_Use_Switch",4.0,0,0,0,0,0); 
        
PlayerInfo[playerid][pCash] += PlayerInfo[playerid][pPensiya]*350
        
format(stringsizeof(string), "Вы получили пенсию: {F7FF00}%d вирт"PlayerInfo[playerid][pPensiya]*350); 
        
ShowPlayerDialog(playerid,6703,DIALOG_STYLE_MSGBOX,"{15FF00}БАНК",string,"ОК",""); 
        
PlayerInfo[playerid][pPensiya] = 0
    }  


В public OnPlayerLogin:

Code: Select all

ini_getInteger(File,"Pensiya",PlayerInfo[playerid][pPensiya]);  


В public OnPlayerUpdateRL:

Code: Select all

ini_setInteger(File,"Pensiya",PlayerInfo[playerid][pPensiya]);  


В public OnPlayerKeyStateChange:

Code: Select all

if(newkeys == 1024OnPlayerCommandText(playerid"/pensiya"); 


В public OnPlayerRegister:

Code: Select all

ini_setInteger(File,"Pensiya",PlayerInfo[playerid][pPensiya]);  
Image

! ! !


Avatar
Miranda F
Старшина
Старшина
Posts: 143
With us: 7 years 2 months

Post #2by Miranda » 5 Jul 2013, 15:32

Это для какого мода?
Image


  • Similar Topics
    Replies
    Views
    Last post

Return to “Уроки”

Who is online

Users browsing this forum: 1 guest