Peršokti į turinį
Mozka

Žmones prašau padekit + REP

Recommended Posts

ar galit kas nors padet?

Beda tokia kad ikeliau pagaliau biznius ir kai juos nusiperku nieko nevyksta negaunu biznio tik pinigus nuema ir po kiek laiko issijungia serveris ka daryt?

Kas pades tam +REP

Ikelciau script bet tiksliai nezinau kuri tai kealius visus ...

Scriptas paciame GM

public OnDialogResponse

if(dialogid == 48)

{

new bizid = playerDB[playerid][rid][2];

if(!response)

{

SendClientMessage(playerid,GREEN,"~g~Verslas ~r~Neparduotas!");

}

if(response)

{

strmid(bussinesDB[bizid][own_name],"no",0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);

new verslass[300];

format(verslass,sizeof(verslass),"saves/bussines/%i",bizid);

if(fexist(verslass)) dini_Remove(verslass);

playerDB[playerid][biznis]=0;

SendClientMessage(playerid,GREEN,"~g~Verslas ~r~Parduotas!");

GivePlayerMoneyA(playerid,250000);

SavePlayerData(playerid,false);

format(verslass,sizeof(verslass),"{FFFFFF}„AB“ Verslas\n{0091FF}Pavadinimas: {FF8000}%s\n{0091FF}Kaina: {FF8000}%i LT\n{0091FF}Pelnas: {FF8000}%i LT/Val",bussinesDB[bizid][pavadinimas],bussinesDB[bizid][bizkaina],bussinesDB[bizid][moka]);

Update3DTextLabelText(bussinesDB[bizid][busstext],WHITE,verslass);

}

return 1;

}

if(dialogid == 890)

{

new bizid = playerDB[playerid][rid][4];

if(!response)

{

SendClientMessage(playerid,GREEN,"~g~Verslas ~r~Nenupirktas!");

}

if(response)

{

if(GetPlayerMoneyA(playerid) < bussinesDB[bizid][bizkaina])

{

SendClientMessage(playerid,GREEN,"~r~Jums Neuztenka Pinigu!");

return 1;

}

GivePlayerMoneyA(playerid,-bussinesDB[bizid][bizkaina]);

new vardas[MAX_PLAYER_NAME];

GetPlayerName(playerid,vardas,sizeof(vardas));

strmid(bussinesDB[bizid][own_name],vardas,0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);

new everslas[300];

format(everslas,sizeof(everslas),"saves/bussines/%i",bizid);

if(!fexist(everslas)) dini_Create(everslas);

dini_Set(everslas,"owner",vardas);

playerDB[playerid][biznis]=bizid;

SendClientMessage(playerid,GREEN,"~g~Verslas ~r~Nupirktas!");

SavePlayerData(playerid,false);

SetPlayerScore(playerid,GetPlayerScore(playerid)+400+random(150));

format(everslas,sizeof(everslas),"{FFFFFF}„AB“ Verslas\n{0091FF}Pavadinimas: {FF8000}%s\n{0091FF}Savininkas: {FF8000}%s",bussinesDB[bizid][pavadinimas],bussinesDB[bizid][own_name]);

Update3DTextLabelText(bussinesDB[bizid][busstext],WHITE,everslas);

}

return 1;

}

Irgi GM

public OnPlayerPickUpPickup(playerid, pickupid)

if(pickupid > pickups[0][bizniss]-1 && pickupid < pickups[1][bizniss]+1)

{

new msg[358],msg2[258],name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

if(!strcmp(bussinesDB[pickupid][own_name],name,true))

{

format(msg,sizeof(msg),"{FF8000}%s",bussinesDB[pickupid][pavadinimas]);

ShowPlayerDialog(playerid,48,DIALOG_STYLE_MSGBOX,msg,"{FFFFFF}Verslas Priklauso Jums!\nNorite Apleisti Ši Versla?","Taip","Ne");

playerDB[playerid][rid][2]=pickupid;

return 1;

}

if(!strcmp(bussinesDB[pickupid][own_name],"no",true))

{

if(playerDB[playerid][biznis] != 0)

{

SendClientMessage(playerid,GREEN,"~r~Jus Jau Turite ~g~Versla.");

return 1;

}

if(GetPlayerScore(playerid) < 5200)

{

SendClientMessage(playerid,GREEN,"~r~Verslui Pirkti Reikia ~g~( 5200xp )");

return 1;

}

format(msg,sizeof(msg),"{FFFFFF}Verslas Parduodamas\n{0091FF}Kaina: {FFFC00}( %iLT )\n{0091FF}Uzdarbis: {FFFC00}( %iLT/Val )\n{0091FF}Norite Pirkti Ši Versla{FFFC00}?",bussinesDB[pickupid][bizkaina],bussinesDB[pickupid][moka]);

format(msg2,sizeof(msg2),"{FF0000}%s",bussinesDB[pickupid][pavadinimas]);

ShowPlayerDialog(playerid,890,DIALOG_STYLE_MSGBOX,msg2,msg,"Taip","Ne");

playerDB[playerid][rid][4]=pickupid;

return 1;

}

format(msg,sizeof(msg),"~r~Verslas ~g~%s\n~r~Priklauso: ~g~%s",bussinesDB[pickupid][pavadinimas],bussinesDB[pickupid][own_name]);

GameTextForPlayer(playerid,msg,2500,0);

return 1;

}

Kodas bussinessDB.txt faile

forward Payday();

enum bitem

{

moka,

bizkaina,

pavadinimas[128],

bpinigai,

own_name[MAX_PLAYER_NAME],

Text3D:busstext

}

new bussinesDB[400][bitem];

stock CreateBussiness(bmoka,bkaina,bpavadinimas[],Float:x,Float:y,Float:z)

{

new busid = CreatePickupA(1272 , 2,x,y,z);

bussinesDB[busid][moka]=bmoka*4;

bussinesDB[busid][bizkaina]=bkaina;

strmid(bussinesDB[busid][pavadinimas],bpavadinimas,0,128,128);

bussinesDB[busid][busstext] = Create3DTextLabel("", WHITE, x,y,z,25, 0, 1);

return busid;

}

Kodas HauseDB.txt faile

new verslas[300];

new tekstas[300];

print("Kraunami bizniai");

for(new house=pickups[0][bizniss]; house

{

format(verslas,sizeof(verslas),"saves/bussines/%i",house);

if(!fexist(verslas))

{

strmid(bussinesDB[house][own_name],"no",0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);

format(tekstas,sizeof(tekstas),"{FF8000}„AB“ Verslas\nPavadinimas: {FF0000}%s\n{FF8000}Kaina: {FF0000}%i LT\n{FF8000}Pelnas: {FF0000}%i LT/Val",bussinesDB[house][pavadinimas],bussinesDB[house][bizkaina],bussinesDB[house][moka]);

Update3DTextLabelText(bussinesDB[house][busstext],WHITE,tekstas);

continue;

}

strmid(bussinesDB[house][own_name],dini_Get(verslas,"owner"),0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);

printf("Verslas %i Priklauso %s",house,bussinesDB[house][own_name]);

format(tekstas,sizeof(tekstas),"{FF8000}Pavadinimas: {FF0000}%s\n{FF8000}Savininkas: {FF0000}%s",bussinesDB[house][pavadinimas],bussinesDB[house][own_name]);

Update3DTextLabelText(bussinesDB[house][busstext],WHITE,tekstas);

}

}

Mano san fierro pickup'ai pickups.txt faile

//==========================================================================================================

//_________________________________________________________________________________________________________//

// Verslų Pickup's //

//_________________________________________________________________________________________________________//

pickups[0][bizniss]=CreateBussiness(2450 ,450000,"Dviračiai", 701.7112,-518.4875,16.3246); //Unikalu

CreateBussiness(6000 ,1200000,"Ginklai", 285.1102,-112.1713,1001.5156); //Unikalu

CreateBussiness(6000 ,1200000,"Šiukšlevežiai", -1879.7449,-155.6399,11.8984); //Unikalu

CreateBussiness(6000 ,1200000,"Medikai", -2643.5120,638.8432,14.4531); //Unikalu

CreateBussiness(6000 ,1200000,"Čili Piza Restoranas", 369.0604,-114.5782,1001.4995); //Unikalu

CreateBussiness(6000 ,1200000,"Sprite Gamykla", -1860.6123,617.2983,35.1719); //Unikalu

CreateBussiness(6000 ,1200000,"Degalinė 2", -1712.3907,401.0606,7.4190); //Unikalu

CreateBussiness(6000 ,1200000,"Transporto Turgus", -1556.5186,317.6695,53.4609); //Unikalu

CreateBussiness(6000 ,1200000,"Transporto Servizas", 97.8839,-160.4585,2.5868); //Unikalu

CreateBussiness(6000 ,1200000,"MaXima XX", -2442.6169,754.2299,35.1719); //Unikalu

CreateBussiness(6000 ,1200000,"Baldai", -1942.8663,556.3875,35.1719); //Unikalu

CreateBussiness(6000 ,1200000,"Bankas", 2308.8843,-2.2679,26.7422); //Unikalu

CreateBussiness(6000 ,1200000,"Bendrabutis", -1899.3989,413.3951,35.1719); //Unikalu

CreateBussiness(6000 ,1200000,"Taxi Firma", 1490.2867,1305.3173,1093.2964); //Unikalu

CreateBussiness(6000 ,1200000,"Degalinė 3", -2000.1558,-832.8705,32.5660); //Unikalu

CreateBussiness(6000 ,1200000,"Siuvykla", -2016.0062,-28.9564,35.2276); //Unikalu

CreateBussiness(6000 ,1200000,"Reporteriai", -2521.1362,-624.2330,132.7816); //Unikalu

CreateBussiness(6000 ,1200000,"Autobusu Firma", -1963.7399,437.6856,35.1719); //Unikalu

CreateBussiness(6000 ,1200000,"Samdomi Žudikai", -2463.1826,-140.8840,25.6777); //Unikalu

CreateBussiness(6000 ,1200000,"Lažybų Punktas", 1288.7283,271.2925,19.5547); //Unikalu

CreateBussiness(6000 ,1200000,"Viešbutis", -2422.1716,342.1684,36.9974); //Unikalu

CreateBussiness(6000 ,1200000,"Garažai", -2154.0742,-740.0518,32.1606); //Unikalu

CreateBussiness(6000 ,1200000,"Disco Įranga", -2015.8959,-12.1261,34.7545); //Unikalu

CreateBussiness(6000 ,1200000,"Saugykla", -242.3354,-236.4958,2.4297); //

CreateBussiness(6000 ,1200000,"Apsauga", -2383.0232,-101.2233,35.3266); //Unikalu

CreateBussiness(6000 ,1200000,"Baras", 501.4703,-78.3910,998.7578); //Unikalu

CreateBussiness(6000 ,1200000,"Klubas", 502.2881,-23.4454,1000.6797); //Unikalu

CreateBussiness(6000 ,1200000,"Degalinė", -2034.8793,148.2226,28.8359); //Unikalu

CreateBussiness(6000 ,1200000,"Traukiniu Stotis", -1982.4579,134.0295,27.6875); //Unikalu

CreateBussiness(6000 ,1200000,"Teleloto Biuras", -2111.5530,-60.6272,35.3203); //Unikalu

pickups[1][bizniss]=CreateBussiness(10150 ,2000000,"Teleloto", 820.6246,9.1168,1004.1962); //Unikalu

Labai prasau padekit...:( Kas pades duosiu +REP

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį



Svečias
Ši tema yra užrakinta.

  • Narių peržiūri šį forumą:   0 nariai

    Nėra registruotų narių peržiūrinčių šį forumą.


  • SuperGames programele
  • SuperGames programele


×