Peršokti į turinį

[SCRIPTAS]Transporto komandos


Winstoned

┼ái tema yra neaktyvi. Paskutinis prane┼íimas ┼íioje temoje buvo prie┼í 3668 dienas (-┼│). Patariame sukurti nauj─ů tem─ů, o ne ra┼íyti nauj─ů prane┼íim─ů.

U┼ż neaktyvi┼│ tem┼│ prik─Ślim─ů galite sulaukti ─»sp─Śjimo ir prane┼íimo pa┼íalinimo!

Recommended Posts

Sveiki,

Ka┼żkaip buvo nuobodoka ir sumas─Źiau sukurti script─ů-transport┼│ komandos. Komandas reik─Śs klijuoti prie vis┼│ komand┼│, o visas komandas sura┼íysit prie transporto komand┼│. Jei kils klausim┼│ ra┼íykit ─» A┼Ż.

 //________________________________________________________________________//
// Transporto Komandos //
//________________________________________________________________________//
if (!strcmp(cmdtext, "/remont", true,7))
{
if (Carlist[playerid][Typ]!=-1)
{
if (Carlist[playerid][status]==0)
{
new reparatur = Buylist[Carlist[playerid][Typ]][Repair];
if (reparatur <= GetPlayerMoney(playerid))
{
Carlist[playerid][status]=1;
Carlist[playerid][Carid]=CreateTunedCar(playerid);
GivePlayerMoney(playerid, - reparatur);
format(string,128,"~r~Suremontuota Uz ~g~%i LT! ~r~Rasyk: ~g~( /Carmapas ).", reparatur);
InfoBoxForPlayer(playerid,string);
SavePlayerData(playerid,false);
}
else { format(string,128,"~r~Atstatymas Kainuoja: ~g~( %i LT ).", reparatur); InfoBoxForPlayer(playerid,string); }
}
else { InfoBoxForPlayer(playerid,"~r~Kazkas Ne Taip."); }
}
else { InfoBoxForPlayer(playerid,"~r~Neturi Ka ~g~Remontuoti!"); }
return 1;
}

if(!strcmp(cmdtext, "/uzrakinti", true,10))
if (strcmp("/uzrakinti", cmd, true) == 0)
{
if (Carlist[playerid][Typ]!=-1)
{
if (Carlist[playerid][Carid]!=-1)
{
if (Carlist[playerid][Lock]==0)
{
Carlist[playerid][Lock]=1;
for(new z=0; z {
if(z == playerid) continue;
SetVehicleParamsForPlayerEx(Carlist[playerid][Carid],z,0,1);
}
GameTextForPlayer(playerid,"Uzrakinai ~g~Transporta!",1000,1);
return 1;
}
else
{
GameTextForPlayer(playerid,"Transportas Jau ~g~Uzrakintas!",1000,1);
}
}
else
{
GameTextForPlayer(playerid,"Neturi ~g~Transporto!",1000,1);
}
return 1;
}
return 1;
}

if(!strcmp(cmdtext, "/atrakinti", true,10))
if (strcmp("/atrakinti", cmd, true) == 0)
{
if (Carlist[playerid][Typ]!=-1)
{
if (Carlist[playerid][Carid]!=-1)
{
if (Carlist[playerid][Lock]==1)
{
Carlist[playerid][Lock]=0;
for(new z=0; z {
SetVehicleParamsForPlayerEx(Carlist[playerid][Carid],z,0,0);
}
GameTextForPlayer(playerid,"Atrakinai ~g~Transporta!",1000,1);
return 1;
}
GameTextForPlayer(playerid,"Transportas Jau ~g~Atrakintas!",2000,1);
return 1;
}
}
else { GameTextForPlayer(playerid,"Neturi ~g~Transporto!",1000,1); }
return 1;
}

if(!strcmp(cmdtext, "/carmapas", true,8))
{
if (Carlist[playerid][Carid]==-1)
{
InfoBoxForPlayer(playerid,"~r~Jus Neturite ~g~Transporto, ~r~Arba Bandykite ~g~( /Remont ). ");
return 1;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
{
InfoBoxForPlayer(playerid,"~g~Autobuse ~r~Naudoti Negalima.");
return 1;
}
new msg[258],Float:coo[6];
GetVehiclePos(Carlist[playerid][Carid],coo[0],coo[1],coo[2]);
GetPlayerPos(playerid,coo[3],coo[4],coo[5]);
new Float:atstumas = ((floatabs(coo[0]-coo[3])+floatabs(coo[1]-coo[4])+floatabs(coo[2]-coo[5]))/3)/100;
SetPlayerCheckpoint(playerid,coo[0],coo[1],coo[2],2);
new salis1[10],salis2[10];
if(coo[0]-coo[3]>0) salis1="rytus"; else salis1="vakarus";
if(coo[1]-coo[4]>0) salis2="siaures"; else salis2="pietu";
format(msg,sizeof(msg),"~r~Jusu Transportas Yra ~g~%f Km ~r~I ~g~%s %s ~r~Nuo Jusu.",atstumas,salis2,salis1);
InfoBoxForPlayer(playerid,msg);
return 1;
}

if(!strcmp(cmdtext, "/islipti", true,7))
{
if (Spectating[playerid][0]!=-1)
{
TogglePlayerControllable(playerid,1);
SetVehicleParamsForAll(Buylist[spectating[playerid][0]][Carid],0,0);
Spectating[playerid][0]=-1;
RemovePlayerFromVehicle(playerid);
}
else { GameTextForPlayer(playerid,"Jus Ne ~g~Transporte.",2000,1); }
return 1;
}

if(!strcmp(cmdtext, "/spos", true,5))
{
if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
{
GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z]);
GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][Rotation]);
CarSaveData(playerid);
vehicleDB[GetPlayerVehicleID(playerid)][gas]=35;
SendClientMessage(playerid, COLOR_BLUE, "Jusu automobilis issaugotas!");
}
else { SendClientMessage(playerid, COLOR_GREY, "Ar gi cia tavo automobilis?!"); }
return 1;
}

if(!strcmp(cmdtext, "/ismesti", true,9))
{
for(new i=0; i {
if(IsPlayerInVehicle(i, Carlist[playerid][Carid]))
{
new Float:xx, Float:yy, Float:zz;
RemovePlayerFromVehicle(i);
GetPlayerPos(i, xx, yy, zz);
SetPlayerPos(i, xx, yy+2, zz+2);
new msg[258], uname[MAX_PLAYER_NAME];
uname[0] = GetPlayerName(i, uname, MAX_PLAYER_NAME);
format(msg, sizeof(msg), "{FFFFFF}Jus I├░spyrete {0091FF}%s {FFFC00}I├░ Savo Transporto!", uname[0]);
SendClientMessage(playerid,GREEN,msg);
SendClientMessage(i,GREEN,"{FFFFFF}Jus Buvote {D40000}I├░mestas, {0091FF}Savininko Nuo├żi├╗ra.");
}
}
GameTextForPlayer(playerid,"Zaidejai Ismesti Is ~g~Transporto.",2000,1);
return 1;
}

if(!strcmp(cmdtext, "/tauto", true,8))
{
if (Carlist[playerid][Carid]==-1)
{
SendClientMessage(playerid,COLOR,"{FFFFFF}Neturi {D40000}Transporto Priemones.");
return 1;
}
new msg[156];
format(msg,sizeof(msg),"{FFFFFF}Jusu Turimas Transportas: {FFFC00}%s",Buylist[Carlist[playerid][Typ]][Name]);
ShowPlayerDialog(playerid,8080,DIALOG_STYLE_MSGBOX,"{FFFFFF}Turimas Transportas:",msg,"U├żdaryti","");
return 1;
}

if(strcmp(cmdtext, "/cparduoti", true)==0)
{
if(GetPlayerScore(playerid)<500)
{
InfoBoxForPlayer(playerid,"~r~Jusu ~g~Score ~r~Per Mazas. Reikia: ~g~( 500xp )");
return 1;
}
if (Carlist[playerid][Typ]!=-1)
{
new price = (Buylist[Carlist[playerid][Typ]][Price]/5)*4;
if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid])) { RemovePlayerFromVehicle(playerid); }
GivePlayerMoneyA(playerid, price);
DestroyVehicle(Carlist[playerid][Carid]);
Carlist[playerid][Typ]=-1; Carlist[playerid][X]=0.0; Carlist[playerid][Y]=0.0; Carlist[playerid][Z]=0.0;
Carlist[playerid][Rotation]=0.0; Carlist[playerid][status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
Carlist[playerid][Color1]=-1; Carlist[playerid][Color2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][mod18]=-1; Carlist[playerid][Paintjob]=-1;
format(string,258,"~r~Pardavete Uz ~g~%d LT!",price);
InfoBoxForPlayer(playerid,string);
if(playerDB[playerid][authstate]==4) SavePlayerData(playerid,false);
}
else { GameTextForPlayer(playerid,"Neturite ~g~Transporto.",2000,1); }
return 1;
}

if(!strcmp(cmdtext, "/siulyti", true,8))
{
if(GetPlayerScore(playerid)<200)
{
InfoBoxForPlayer(playerid,"~r~Jusu ~g~Score ~r~Per Mazas. Reikia: ~g~( 200xp )");
return 1;
}
new tname[MAX_PLAYER_NAME];
strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);
if(!strcmp(tname,"0",true)){InfoBoxForPlayer(playerid,"~r~Parduoti Transportà: ~g~( /Siulyti ) - Vardas - Kaina"); return 1;}
new sellplayerid = GetPlayeridMid(tname);
if(sellplayerid==INVALID_PLAYER_ID)
{
InfoBoxForPlayer(playerid,"~r~Tokio Zaidejo Nera");
return 1;
}
if(GetPlayerScore(sellplayerid)<100)
{
InfoBoxForPlayer(playerid,"~r~Pirkejas Dar Neturi ~g~( 100xp )");
return 1;
}
GetPlayerName(sellplayerid,tname,sizeof(tname));
new tstring[256];
tstring = GetArgument(2, cmdtext, 0);
if(!IsNumeric(tstring)){InfoBoxForPlayer(playerid,"~r~Parduoti Transportà: ~g~( /Siulyti ) - Vardas - Kaina"); return 1;}
new price = StringToInt(tstring);
if(price < 1000){InfoBoxForPlayer(playerid,"~r~Kaina Turi Buti Nemazesne Kaip: ~g~( 1000LT )"); return 1;}
new Float:Coo[3];
GetPlayerPos(sellplayerid,Coo[0],Coo[1],Coo[2]);
if(!PlayerToPoint(30, playerid, Coo[0],Coo[1],Coo[2])){InfoBoxForPlayer(playerid,"~r~Zaidejas Per Toli"); return 1;}
if (Carlist[playerid][Typ]==-1)
{
GameTextForPlayer(playerid,"Neturite ~g~Transporto.",2000,1);
return 1;
}
offerCar[sellplayerid][0]=playerid;
offerCar[sellplayerid][1]=price;
new playername[MAX_PLAYER_NAME];
new sellplayername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
GetPlayerName(sellplayerid,sellplayername,sizeof(sellplayername));
format(string,258,"Tu Si├╗lai {0091FF}%s Pirkti U├ż {FF00E2}%i LT!",sellplayername,price);
SendClientMessage(playerid, RED, string);
format(string,258,"{0091FF}%s Si├╗lo {0091FF}%s U├ż {FF00E2}%i LT.",playername,Buylist[Carlist[playerid][Typ]][Name],price);
SendClientMessage(sellplayerid, RED, string);
SendClientMessage(sellplayerid, COLOR_YELLOW, "Nori Pirkti {FFFC00}( /Sutinku ).");
SendClientMessage(sellplayerid, COLOR_YELLOW, "Nenori Pirkti {D40000}( /Atsaukti ).");
return 1;
}

if(!strcmp(cmdtext, "/atsaukti", true,9))
{
for (new i=0; i {
if (offerCar[i][0]==playerid)
{
offerCar[i]={-1,0};
GameTextForPlayer(playerid,"~r~Atsisakei Nusipirkti ~g~Transporta.",2000,1);
if (IsPlayerConnected(i))
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,128,"~g~%s ~r~Atsisake Nupirkti.",playername);
InfoBoxForPlayer(i,string);
}
return 1;
}
}
InfoBoxForPlayer(playerid,"~g~Transporto ~r~Jums Niekas ~g~Nesiulo.");
return 1;
}

if(!strcmp(cmdtext, "/sutinku", true,8))
{
if(GetPlayerScore(playerid)<200)
{
InfoBoxForPlayer(playerid,"~r~Jusu ~g~Score ~r~Per Mazas. Reikia: ~g~( 200xp )");
return 1;
}
if (offerCar[playerid][0]!=-1)
{
if (IsPlayerConnected(offerCar[playerid][0]))
{
if (Carlist[playerid][Typ]==-1)
{
if (Carlist[offerCar[playerid][0]][Typ]!=-1)
{
if (GetPlayerMoneyA(playerid)>=offerCar[playerid][1])
{
new sellerid=offerCar[playerid][0];
new price=offerCar[playerid][1];
offerCar[playerid]={-1,0};
GivePlayerMoneyA(playerid, - price);
GivePlayerMoneyA(sellerid, price);
Carlist[playerid][Typ]=Carlist[sellerid][Typ];
Carlist[playerid][X]=Carlist[sellerid][X];
Carlist[playerid][Y]=Carlist[sellerid][Y];
Carlist[playerid][Z]=Carlist[sellerid][Z];
Carlist[playerid][Rotation]=Carlist[sellerid][Rotation];
Carlist[playerid][status]=Carlist[sellerid][status];
Carlist[playerid][Lock]=Carlist[sellerid][Lock];
Carlist[playerid][Carid]=Carlist[sellerid][Carid];
Carlist[playerid][Color1]=Carlist[sellerid][Color1];
Carlist[playerid][Color2]=Carlist[sellerid][Color2];
Carlist[playerid][mod1]=Carlist[sellerid][mod1];
Carlist[playerid][mod2]=Carlist[sellerid][mod2];
Carlist[playerid][mod3]=Carlist[sellerid][mod3];
Carlist[playerid][mod4]=Carlist[sellerid][mod4];
Carlist[playerid][mod5]=Carlist[sellerid][mod5];
Carlist[playerid][mod6]=Carlist[sellerid][mod6];
Carlist[playerid][mod7]=Carlist[sellerid][mod7];
Carlist[playerid][mod8]=Carlist[sellerid][mod8];
Carlist[playerid][mod9]=Carlist[sellerid][mod9];
Carlist[playerid][mod10]=Carlist[sellerid][mod10];
Carlist[playerid][mod11]=Carlist[sellerid][mod11];
Carlist[playerid][mod12]=Carlist[sellerid][mod12];
Carlist[playerid][mod13]=Carlist[sellerid][mod13];
Carlist[playerid][mod14]=Carlist[sellerid][mod14];
Carlist[playerid][mod15]=Carlist[sellerid][mod15];
Carlist[playerid][mod16]=Carlist[sellerid][mod16];
Carlist[playerid][mod17]=Carlist[sellerid][mod17];
Carlist[playerid][mod18]=Carlist[sellerid][mod18];
Carlist[playerid][Paintjob]=Carlist[sellerid][Paintjob];
Carlist[sellerid][Typ]=-1; Carlist[sellerid][X]=0.0; Carlist[sellerid][Y]=0.0; Carlist[sellerid][Z]=0.0;
Carlist[sellerid][Rotation]=0.0; Carlist[sellerid][status]=0; Carlist[sellerid][Lock]=0; Carlist[sellerid][Carid]=-1;
Carlist[sellerid][Color1]=-1; Carlist[sellerid][Color2]=-1; Carlist[sellerid][mod1]=-1; Carlist[sellerid][mod2]=-1;
Carlist[sellerid][mod3]=-1; Carlist[sellerid][mod4]=-1; Carlist[sellerid][mod5]=-1; Carlist[sellerid][mod6]=-1;
Carlist[sellerid][mod7]=-1; Carlist[sellerid][mod8]=-1; Carlist[sellerid][mod9]=-1; Carlist[sellerid][mod10]=-1;
Carlist[sellerid][mod11]=-1; Carlist[sellerid][mod12]=-1; Carlist[sellerid][mod13]=-1; Carlist[sellerid][mod14]=-1;
Carlist[sellerid][mod15]=-1; Carlist[sellerid][mod16]=-1; Carlist[sellerid][mod17]=-1; Carlist[sellerid][mod18]=-1; Carlist[sellerid][Paintjob]=-1;
if (Carlist[playerid][status]==1)
{
SetVehicleParamsForAll(Carlist[playerid][Carid],0,Carlist[playerid][Lock]);
SetVehicleParamsForPlayer(Carlist[playerid][Carid],playerid,0,0);
}
format(string,258,"Sveikiname! Jus ├üsigijote Transport├á {FFFC00}%s U├ż {0077FF}%i LT!",Buylist[Carlist[playerid][Typ]][Name],price);
SendClientMessage(playerid,RED,string);
playerDB[playerid][dujubalionas] = true;
playerDB[sellerid][dujubalionas] = false;
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,258,"Jus Pardavete {FFFC00}%s U├ż {0077FF}%i LT!",playername, price);
SendClientMessage(sellerid,RED,string);
}
else
{
format(string,258,"Nepakanka Pinig├Ş. Reikia: {0077FF}( %i LT )!", offerCar[playerid][1]);
SendClientMessage(playerid, COLOR_GREY, string);
InfoBoxForPlayer(offerCar[playerid][0],"~r~Pirkejas Neturi Pinigu.");
}
}
else
{
offerCar[playerid]={-1,0};
InfoBoxForPlayer(playerid,"~r~Zaidejas Jau Pardave ~g~Transporto Priemone.");
}
}
else
{
InfoBoxForPlayer(playerid,"~r~Jus Jau Turite ~g~Transporto Priemone.");
}
}
else
{
offerCar[playerid]={-1,0};
InfoBoxForPlayer(playerid,"~r~Tokio Zaidejo Nera");
}
}
else
{
InfoBoxForPlayer(playerid,"~r~Ne.");
}
return 1;
}

new idx;
cmd = strtok(cmdtext,idx);

Nuoroda ─» komentar─ů
Dalintis per kit─ů puslap─»

Copy paste tikrai :D nes n─Śra daug ko ─Źia tik komandos o naudojimai jose yra kur reikiami stockuose arba newuose kituose :P XD tiek komandu tikrai neplatintu niekas kaikuriu net reikia,ir kaikuriuose gm saugo kitaip ma┼íinas ...

Nuoroda ─» komentar─ů
Dalintis per kit─ů puslap─»

┼ái tema yra neaktyvi. Paskutinis prane┼íimas ┼íioje temoje buvo prie┼í 3668 dienas (-┼│). Patariame sukurti nauj─ů tem─ů, o ne ra┼íyti nauj─ů prane┼íim─ů.

U┼ż neaktyvi┼│ tem┼│ prik─Ślim─ů galite sulaukti ─»sp─Śjimo ir prane┼íimo pa┼íalinimo!

Sve─Źias
┼ái tema yra u┼żrakinta.
  • ┼áiame puslapyje nar┼ío:   0 nariai

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




├Ś
├Ś
  • Sukurti nauj─ů...