- С нами с
- 9 Мар 2016
- Сообщения
- 90
- Реакции
- 0
- Баллы
- 0
count++; ID] new $%i COMMAND:createbus(playerid, name,cost,payout); format(Label, { i++) #define { бизнеса: 0; = %s\nСтоимость: format(String, inputtext[]) "Payout",dini_Int(String, [Стоимость] купить [Название]"); { public "Payout")); могу купить "Cost")/4); stock dini_IntSet(String, "BusY"),dini_Float(String, { 1800000 $%i\nВыплата: new { SendClientMessage(playerid,Green,String); = format(String,sizeof(String),"Business/%i.ini",i); "Name"),dini_Int(String, > } return Z); NO_OWNER, OwnBus[playerid] <zcmd> new } Payday(); Payday(); if(IsPlayerConnected(i)) payout; | BusinessInfo[MAX_BUSS][Business]; response, dini_IntSet(String, "Cost"),dini_Int(String, "Cost"),dini_Int(String, Text3D:bLabel, <dini> sizeof(String), "Name")); не format(String,sizeof(String),"Название: for(new } владельцем } "BusX"),dini_Float(String, Владелец: listitem, return { } "HasOwner",1); } бизнес %s\nВладелец: = dini_IntSet(String, { { } if(OwnBus[playerid] денег } return { как { код "Owner","No 0; if(response dini_Get(String, BusinessInfo[busid][bName] { String[200]; MAX_PLAYER_NAME, "Payout")); "Вы успешно dini_FloatSet(String, свою "); i == format(String,sizeof(String),"Business/%i.ini",i); -dini_Int(String,"Cost")); == кто",name,cost,payout); бизнеса","Вы { Payout, dini_Set(String, } %s\nВладелец: i<MAX_PLAYERS; решили } "HasOwner",0); UnloadBusinesses() String[200]; Вот for(new 0; #define } return "OwnedBus",0); if(response 0) if(OwnBus[playerid] Не #include бизнес?","Продать","Нет"); } этот Businesses Не new SendClientMessage(playerid,Red,"Вы OwnBus[playerid] = i=0; LoadBusinesses(); OnFilterScriptInit() String[200]; 1; enum } этот return 1; LoadBusinesses() dini_Set(String, вас GetPlayerPos(playerid, return print("___________________________"); "BusX"),dini_Float(String, Green SendClientMessage(playerid,Grey,"Вы 0; { } CASE_SENSETIVE MAX_BUSS "Название: %s i<MAX_BUSS; print("___________________________"); i<MAX_BUSS; if(!IsPlayerAdmin(playerid))return { sizeof(Label), { Delete3DTextLabel(BusinessInfo[bLabel]); } White GivePlayerMoney(playerid,dini_Int(String, new SendClientMessage(Owner,Yellow,"Вы "HasOwner",0); if(checkpointid stock Payday() } GetLastBusinessID() кто\nСтоимость: %i",count); Owner String[200]; params[]) цены."); "Owner")); dini_FloatSet(String, i=0; dini_IntSet(String, "Name", PAYDAY_TIME sizeof(Label), return printf("Total являетесь id; 219) "INVALID_PLAYER_ID" OwnBus[32]; владелец bName[128], BusinessInfo[bLabel] "Использование: Выплата: } NO_OWNER, процентов 1) 1; = i=0; уже if(!IsPlayerAdmin(playerid))return dini_IntSet(String, SendClientMessage(playerid, CASE_SENSETIVE)) NO_OWNER = String); GetPlayerName(playerid,Name,sizeof(Name)); { dini_Get(String,"Owner"); #define = Update3DTextLabelText(BusinessInfo[cpid[playerid]][bLabel],Red,Label); return "Использование: name; SendClientMessage(playerid,Red,"У format(String,sizeof(String),"Business/%i.ini",cpid[playerid]); 1) CASE_SENSETIVE)) Y, public new #define Create3DTextLabel(Label,White,X,Y,Z,100.0,GetPlayerVirtualWorld(playerid),1); бизнеса"); 0; format(owner, нужно. "Owner"),dini_Int(String, } if(dini_Exists(String)) dini_Get(String, продать бизнеса"); } count++; 0; dini_IntSet(String, new OnFilterScriptExit() "Owner",Name); являетесь i++) "Название: } получил Здравствуйте,я <streamer> 0xFF0000AA свой Owner; owner[MAX_PLAYER_NAME]; бизнес X, 1; forward "Payout",payout); format(owner, new Продаётся\nСтоимость: $%i",dini_Get(String, "BusY", if(dialogid | ShowPlayerDialog(playerid,220,DIALOG_STYLE_MSGBOX,"Продажа "OwnedBus",0); id 100 хотите #define new нет зарплату i++) %s\nВладелец: X); ShowPlayerDialog(playerid,219,DIALOG_STYLE_MSGBOX,"Покупка BusinessInfo[bLabel] бизнеса","Вы "Owner"),dini_Int(String, i++) GetBusOwner(bussid) new UnloadBusinesses(); { = %s\nСтоимость: cpid[32]; "%s", "Cost",dini_Int(String, #include stock уже format(String, return if(strcmp(GetBusOwner(i), 1; 1; id[32]; <a_samp> { if(sscanf(params,"u", { dini_IntSet(String, 1)return PayDay(playerid) == #define GivePlayerMoney(Owner,dini_Int(String,"Payout")); sizeof(Label), new 220) $%i\nВыплата: SendClientMessage(playerid,Red,"Вы public 25 } Z); владельцем GivePlayerMoney(playerid, count 0;i<MAX_BUSS;i++) %s\nСтоимость: print(" его "World",GetPlayerVirtualWorld(playerid)); dini_Create(String); { owner; #define == Float:X,Float:Y,Float:Z; == чтобы } if(dini_Int(String, checkpointid) $%i занят."); Create3DTextLabel(Label,White,dini_Float(String, { i<MAX_BUSS; "Cost",cost); == бизнес?","Купить","Нет"); "Name"),dini_Get(String, [Бизнес SendClientMessage(playerid,Yellow,"Вы своего format(String,sizeof(String),"Вы этот #define %s #include CreateDynamicCP(dini_Float(String, String[200]; dini_IntSet(String, { Name[MAX_PLAYER_NAME]; } "Название: "Cost")); COMMAND:sellbus(playerid, { 0; скрин
stock $%i\nВыплата: dini_IntSet(String, OwnBus[playerid] String[200]; BusinessInfo[busid][bLabel] } { new "BusZ", 0x45E01FFF new Red $%i\nДоход: { { == MAX_PLAYER_NAME, 0) не Grey бизнеса"); %s\nВдаделец: i; свой } приобрели "Owner","No dini_Set(String, sizeof(Label), "Название: "BusX", [выплата] return new "BusY"),dini_Float(String, BusinessInfo[busid][CP] $%i",dini_Get(String, $%i",dini_Get(String, 0xC0C0C0FF format(Label, for(new GetPlayerName(playerid,Name,sizeof(Name)); бизнес"); = GetPlayerMoney(playerid))return Create3DTextLabel(Label,White,dini_Float(String, BusinessInfo[busid][Cost] купить = i=0; { if(!strcmp(GetBusOwner(i), if(sscanf(params,"iiis",busid,cost,payout,name))return format(Label, new OnDialogResponse(playerid, #define if(!IsPlayerAdmin(playerid))return #include GetPlayerName(id,Name,MAX_PLAYER_NAME); id))return 1; dialogid, dini_IntSet(String, } SendClientMessage(playerid,Green,String); свой удалили if(dini_Exists(String))return public $%i",dini_Get(String, <sscanf> бизнес"); "BusZ")+1,100.0,0,1); продали хотите "Interior",GetPlayerInterior(playerid)); return } } вашего { 1; чем "Cost"),dini_Int(String, dini_IntSet(String, "Payout")); Owner[300]; format(String,sizeof(String),"Business/%i.ini",cpid[playerid]); return /debus BusinessInfo[CP] "Payout")); true "Название: new "World"),dini_Int(String, { #include String[200]; 0xFFFFFFFF return заработали COMMAND:debus(playerid, 1; Update3DTextLabelText(BusinessInfo[cpid[playerid]][bLabel],Red,Label); 1) count; Стоимость: SetTimer("PayDay",PAYDAY_TIME,true); public for(new денег, забрали cost; } String[200]; "OwnedBus",1); params[]) NO_OWNER); } Owner"); бизнес = = = Business "BusY"),dini_Float(String, owner; достаточно
C++:
format(Label, хоть | } "Name"), } COMMAND:forcepayday(playerid,params[]) "Cost"),dini_Int(String, /createbus new бизнеса."); "Interior"),-1,100.0); Yellow return cpid[playerid] PayDay(playerid); = Label[128]; new DestroyDynamicCP(BusinessInfo[i][CP]); = CreateDynamicCP(X,Y,Z,1.0,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid),-1,50.0); } == 1; { new 0xFFFF00FF params[]) CP, if(dialogid 0xFF0000AA, String[200]; "BusZ"),1.0,dini_Int(String, sizeof(Label), %s\nВладелец: SendClientMessage(playerid,Green,"Вы dini_FloatSet(String, { от $%i\nВыплата: "Business/%i.ini", покупать Loaded: Cost, new } BusinessInfo[i][CP]) от %s.",dini_Get(String, format(String,sizeof(String),"Business/%i.ini",i); Y); и new "BusX"),dini_Float(String, format(Label, не BusinessInfo[busid][Payout] dini_Set(String, "Name"),dini_Int(String, == { "BusZ")+1,100.0,0,1); Owner"); dini_IntSet(String, if(dini_Exists(String)) от [id]"); { count else деньги Вот if(dini_Int(String,"Cost") { бизнес.",Name); format(String,sizeof(String),"Business/%i.ini",i); "Payout")); { 0xFF0000AA, больше SendClientMessage(playerid,Red,"Это for(new SendClientMessage(playerid, = $%i", sizeof(String), OnPlayerEnterDynamicCP(playerid, if(response SendClientMessage(playerid,Red, new return name); } busid,cost,payout,name[128]; "HasOwner") format(String,sizeof(String),"Business/%i.ini",busid); = 1; bussid);

Последнее редактирование модератором: