arnas5

sveiki reikia pagalbos.

Recommended Posts

Sveiki gal kas galetu imesti scripta,filterscripta ar pamoka kaip pasidaryti serveryje kad butu galima nusipirkti ir naudoti 2 masinas, ir kad butu degalu sistema tiksliau kad butu pasirinktinai 3 degalu rusis benzinas,dujos ir dyzelinas ir kad butu atskiros koloneles ir kainos... Kas pades tam +R3P 2 dienas is eiles...

As dar tik pradedantis scripteris tai pats susikurti nelabai moku reiketu kokios pamokos.

Dalintis ┼í─» prane┼íim─ů


Nuoroda iki šio pranešimo
Dalintis per kit─ů puslap─»

Dalintis ┼í─» prane┼íim─ů


Nuoroda iki šio pranešimo
Dalintis per kit─ů puslap─»

+R3P daviau ,bet pasiskaites komentarus pastebejau kad degalu sistema daug error'u turi o masinu sistemai nzn reikes pameginti.

Dalintis ┼í─» prane┼íim─ů


Nuoroda iki šio pranešimo
Dalintis per kit─ů puslap─»

paskui prie delogu idedate:

Kodas:

if( dialogid == 800 )

{

if( response )

{

if( listitem == 0 )

{

new

pName [ MAX_PLAYER_NAME ],

vehicleid = GetPlayerVehicleID ( playerid );

GetPlayerName ( playerid, pName, MAX_PLAYER_NAME );

if( !IsPlayerInAnyVehicle( playerid ) && GetPlayerState( playerid ) != PLAYER_STATE_DRIVER ) return SendClientMessage( playerid, RED, "Privalote buti transporte." );

if( !vehicleDB[ vehicleid ][ locked ] )

{

if( LockedCars[ playerid ] >= 2 ) return SendClientMessage( playerid, RED, "Jus jau turite uzrakines dvi car." );

new tModel = GetVehicleModel(vehicleid);

if(tModel == 510 || tModel == 437 || tModel == 538 || tModel == 545 || tModel == 433 || tModel == 548 || tModel == 470 || tModel == 490 || tModel == 601 || tModel == 528 || tModel == 415 || tModel == 574 || tModel == 423 || tModel == 588 || tModel == 448 || tModel == 499 || tModel == 442 || tModel == 408 || tModel == 424 || tModel == 473 )

{SendClientMessage(playerid,0xFF9900AA," ├Éios transporto priemon├źs u├żrakinti negalima !"); return 1;}

if(tModel == 414 || tModel == 455 || tModel == 486 || tModel == 524 || tModel == 593 || tModel == 512 || tModel == 476 || tModel == 577 || tModel == 407 || tModel == 420 || tModel == 597 || tModel == 599 || tModel == 523 || tModel == 497 || tModel == 416 || tModel == 563 || tModel == 525 || tModel == 566 || tModel == 470 || tModel == 433 )

{SendClientMessage(playerid,0xFF9900AA," ├Éios transporto priemon├źs u├żrakinti negalima !"); return 1;}

if(tModel == 548 || tModel == 515 || tModel == 514 || tModel == 582 || tModel == 600 || tModel == 535 )

{SendClientMessage(playerid,0xFF9900AA," ├Éios transporto priemon├źs u├żrakinti negalima !"); return 1;}

if( CarOne[ playerid ] == INVALID_VEHICLE_ID )

CarOne[ playerid ] = vehicleid;

else

CarTwo[ playerid ] = vehicleid;

LockedCars[ playerid ] += 1;

vehicleDB[ vehicleid ][ locked ] = true;

format( vehicleDB[ vehicleid ][ owner_name ], MAX_PLAYER_NAME, "%s", pName );

for( new i = 0; i < MAX_PLAYERS; i++ )

{

if( i != playerid )

{

SetVehicleParamsForPlayer( vehicleid, i, 0, 1 ); // lock.

}

}

SendClientMessage( playerid, RED, "Uzrakinai transporta" );

}

else

{

new

file [ 60 ];

vehicleDB[ vehicleid ][ locked ] = false;

if( CarOne[ playerid ] == vehicleid )

{

format( file, sizeof( file ), "saves/vehicles/%s.ini", pName );

if( dini_Exists( file ) ) dini_Remove( file );

CarOne[ playerid ] = INVALID_VEHICLE_ID;

MaxVeh( playerid );

}

else if( CarTwo[ playerid ] == vehicleid )

{

format( file, sizeof( file ), "saves/vehicles/%s2.ini", pName );

if( dini_Exists( file ) ) dini_Remove( file );

CarTwo[ playerid ] = INVALID_VEHICLE_ID;

MaxVeh( playerid );

}

for( new i = 0; i < MAX_PLAYERS; i++ )

{

if( i != playerid )

{

SetVehicleParamsForPlayer( vehicleid, i, 0, 0 ); // lock.

}

}

SendClientMessage( playerid, RED, "Atrakinai transporta" );

}

}

else if( listitem == 1 )

{

if( IsPlayerInAnyVehicle( playerid ) )

{

new

vehicleid = GetPlayerVehicleID( playerid ),

msg [ 256 ];

format ( msg, sizeof( msg ), "{FFFFFF}U├żraktas\nTransporto rida: {FF0000}%.2f\n{FFFFFF}1-jo transporto pozicija\n2-jo transporto pozicija", vehicleDB[ vehicleid ][ rida ]/100000 );

ShowPlayerDialog ( playerid, 800, DIALOG_STYLE_LIST, "Transporto valdymas", msg, "Rinktis", "U├żdaryti" );

}

else

{

ShowPlayerDialog ( playerid, 800, DIALOG_STYLE_LIST, "Transporto valdymas", "{FFFFFF}U├żraktas\nTransporto rida: {FF0000}Privalote b├╗ti transporte!\n{FFFFFF}1-jo transporto pozicija\n2-jo transporto pozicija", "Rinktis", "U├żdaryti" );

}

}

else if( listitem == 2 )

{

if( CarOne[ playerid ] == INVALID_VEHICLE_ID ) return SendClientMessage( playerid, RED, "Neturite 1jo transporto" );

new

Float:vPos[ 3 ],

vehicleid = CarOne[ playerid ];

GetVehiclePos( vehicleid, vPos[ 0 ], vPos[ 1 ], vPos[ 2 ] );

SetPlayerCheckpoint( playerid, vPos[ 0 ], vPos[ 1 ], vPos[ 2 ], 2 );

SendClientMessage( playerid, RED, "Tavo masina pazymeta raudonu tasku.");

}

else if( listitem == 3 )

{

if( CarTwo[ playerid ] == INVALID_VEHICLE_ID ) return SendClientMessage( playerid, RED, "Neturite 2jo transporto" );

new

Float:vPos[ 3 ],

vehicleid = CarTwo[ playerid ];

GetVehiclePos( vehicleid, vPos[ 0 ], vPos[ 1 ], vPos[ 2 ] );

SetPlayerCheckpoint( playerid, vPos[ 0 ], vPos[ 1 ], vPos[ 2 ], 2 );

SendClientMessage( playerid, RED, "Tavo masina pazymeta raudonu tasku.");

}

}

return true;

}

Kur tie dialogai randasi???

ir

paskui susirandi eilute:

public OnPlayerConnect(playerid)

paskui susirandi eilute:

public OnPlayerDisconnect(playerid, reason)

po tom eilutem bet kur deti ??

ir ka daryti jei bus sena sistema kokia ir maisys?

Dalintis ┼í─» prane┼íim─ů


Nuoroda iki šio pranešimo
Dalintis per kit─ů puslap─»

o kur tie delogai randasi?

-- Papildyta --

//Masinos pirkimas

else if(mode == 2)

{

print("masina");

new kaina = playerDB[playerid][rkaina][1];

new vehicleid = playerDB[playerid][rid][1];

if(!strcmp(text,"taip",true))

{

if(GetPlayerMoneyA(playerid) < kaina)

{

SendClientMessage(playerid,RED,"* Neturite tiek pinigu");

return 0;

}

GivePlayerMoneyA(playerid,-kaina);

PutPlayerInVehicle(playerid,vehicleid,0);

vehicleDB[vehicleid][parduodama]=true;

SendClientMessage(playerid,GREEN,"* Masina nupirkta. + Dovana, gesintuvas!");

GivePlayerWeapon(playerid,42,15);

SetPlayerScore(playerid,(GetPlayerScore(playerid)+1));

OutputGas(playerid,vehicleid,true);

}

return 0;

}

sita istrinti ar ne cia senas

-- Papildyta --

//Masina atrakinama ir gauna degalu

vehicleDB[vehicleid][gas]=60;

vehicleDB[vehicleid][locked]=false;

//Nustato, masina turguje, ar ne.

new Float:tmpx,Float:tmpy,Float:tmpz;

GetVehiclePos(vehicleid,tmpx,tmpy,tmpz);

if(IsTurgus(tmpx,tmpy)){

vehicleDB[vehicleid][parduodama]=false;

}else{

vehicleDB[vehicleid][parduodama]=true;

}

return 1;

}

public OnVehicleDeath(vehicleid, killerid)

{

new i;

for(i=0; i

{

if(Carlist[Carid]==vehicleid)

{

SetTimerEx("DelayDestroyCar",3000,0,"i",i);

return 1;

}

}

if(vehicleDB[vehicleid][locked])

{

new name[MAX_PLAYER_NAME];

new user = vehicleDB[vehicleid][lastuser];

GetPlayerName(user,name,sizeof(name));

if(!IsPlayerConnected(user)) return 1;

if(strcmp(name,vehicleDB[vehicleid][owner_name],true)) return 1;

playerDB[user][pcar]=-1;

playerDB[user][pcar2]=-1;

}

if(GetVehicleModel(vehicleid) == SHAMAL)

{

for(new playerid=0; playerid

{

if(IsPlayerConnected(playerid))

{

if(playerDB[playerid][lektuvas]==vehicleid)

{

SetPlayerHealth(playerid,2);

new Float:lolX, Float:lolY, Float:lolZ, Float:lolA;

GetVehiclePos(playerDB[playerid][lektuvas], lolX, lolY, lolZ);

GetVehicleZAngle(playerDB[playerid][lektuvas], lolA);

lolX += (5 * floatsin(-floatsub(lolA, 45.0), degrees)),

lolY += (5 * floatcos(-floatsub(lolA, 45.0), degrees));

SetPlayerInterior(playerid, 0);

SetPlayerPos(playerid, lolX, lolY, floatsub(lolZ, 0.94));

SetPlayerFacingAngle(playerid, lolA);

SetPlayerVirtualWorld(playerid,0);

playerDB[playerid][lektuvas]=-1;

}

}

}

}

if(GetVehicleModel(vehicleid) == SHAMAL)

{

for(new playerid=0; playerid

{

if(IsPlayerConnected(playerid))

{

if(playerDB[playerid][lektuvas]==vehicleid)

{

SetPlayerHealth(playerid,2);

new Float:lolX, Float:lolY, Float:lolZ, Float:lolA;

GetVehiclePos(playerDB[playerid][lektuvas], lolX, lolY, lolZ);

GetVehicleZAngle(playerDB[playerid][lektuvas], lolA);

lolX += (5 * floatsin(-floatsub(lolA, 45.0), degrees)),

lolY += (5 * floatcos(-floatsub(lolA, 45.0), degrees));

SetPlayerInterior(playerid, 0);

SetPlayerPos(playerid, lolX, lolY, floatsub(lolZ, 0.94));

SetPlayerFacingAngle(playerid, lolA);

SetPlayerVirtualWorld(playerid,0);

playerDB[playerid][lektuvas]=-1;

}

}

}

}

SetVehicleToRespawn(vehicleid);

//SetVehiclePos(vehicleid, vehicleDB[vehicleid][respawnpos][0], vehicleDB[vehicleid][respawnpos][1], vehicleDB[vehicleid][respawnpos][2]);

//SetVehicleZAngle(vehicleid, vehicleDB[vehicleid][respawnrot]);

vehicleDB[vehicleid][lastpos][0]=0;

vehicleDB[vehicleid][lastpos][1]=0;

vehicleDB[vehicleid][lastpos][2]=0;

return 1;

dar tie seni yra irgi trinti?

-- Papildyta --

Kur tie delogai? :)

-- Papildyta --

O gal kurisnors galetumet ideti abi sistemas tam +R3P 2 dienas nes man niekaip neiseina :(

Dalintis ┼í─» prane┼íim─ů


Nuoroda iki šio pranešimo
Dalintis per kit─ů puslap─»

Prisijungti prie diskusijos

Palikti atsakym─ů galite i┼í karto, o u┼żsiregistruoti v─Śliau. Jeigu jau turite paskyr─ů m┼źs┼│ forume, Prisijunkite.

Sve─Źias
Atsakyti šioje temoje...

×   ─«klijuotas tekstas turi teksto formatavim─ů.   Pa┼íalinti teksto formatavim─ů

  Galimi tik 75 veidukai.

×   Nuoroda buvo automati┼íkai ─»terpta.   ─«terpti nuorod─ů paprastai

×   J┼źs┼│ ankstesnis prane┼íimas buvo atkurtas.   I┼ívalyti redaktori┼│

×   You cannot paste images directly. Upload or insert images from URL.


  • ┼áiame puslapyje nar┼ío:   0 nariai

    N─Śra registruot┼│ nari┼│ per┼żi┼źrin─Źi┼│ ┼í─» forum─ů.

  • eneba
  • eneba
  • eneba



  • SuperGames programele
  • SuperGames programele