Quantcast
Channel: SA-MP Forums - Filterscripts
Viewing all articles
Browse latest Browse all 595

[GameMode] Pomoc oko izmesanih ID-eva vozila

$
0
0
Ima problem sa izmesanim vozilima poslova i onima na pijaci zato ne radi komanda /v buy kad hoces kupiti neko vozilo koje je na buy a pre toga si ga kreirao pise da nije na buy zato sto se posle restarta izmesaju ID-evi vozila pomoc ?

//================================================== =============
forward IsAnOwnableCar(vehicleid);

for(new o; o < MAX_VEHICLES; o++)
{


if(IsAnOwnableCar(o))
{
Fuel[o] = CarInfo[o][cFuel];
}
else
{
Fuel[o] = 100;
}


new i = GetPlayerVehicleID(playerid);
if(IsAnOwnableCar(i))
{
if(CarInfo[i][cProdaja] == 1)
{
new msg[200], model[40];
GetVehicleName(i,model,sizeof(model));
format(msg,sizeof(msg),"~r~Vozilo: ~g~%s~n~~r~Cena: ~g~%d~n~~w~/v buy da bi kupio ovo vozilo~n~",model,CarInfo[i][cCena]);
GMT(playerid,msg,4000,3);
}
}

public IsAnOwnableCar(vehicleid)
{
if(vehicleid >=509 && vehicleid <=ServerInfo[sSrvozila]) { return 1; }
return 0;
}



CMD:napravivozilo(playerid,params[])
{
if(Ulogovan[playerid] == 0 || PlayerInfo[playerid][pReg] == 0) return SCM(playerid,COLOR_RED,"Ne mozete da koristite komande dok se ne ulogujete/registrujete !");
if(PlayerInfo[playerid][pAdmin] < 1340) return 1;
{
new model,cena,col1,col2;
if(sscanf(params,"dddd",model,cena,col1,col2)) return SCM(playerid,grey,"KOMANDA: /napravivozilo [ Model ID ] [ Cena ] [ Boja 1 ] [ Boja2 ]");
{
if(model < 400 || model > 611) return SCM(playerid,-1,"Vozilo ID 400-611 !");
if(col1 < 0 || col1 > 255) return SCM(playerid,-1,"Boja vozila ID 0-255 !");
if(col2 < 0 || col2 > 255) return SCM(playerid,-1,"Boja vozila ID 0-255 !");
{
ServerInfo[sSrvozila] ++;
SaveSrv();
{
new Float:X,Float:Y,Float:Z,Float:A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
new veh[40];
GetVehicleName(ServerInfo[sSrvozila],veh,sizeof(veh));
AddStaticVehicle(model,X, Y+2 ,Z, A, col1, col2);
CarInfo[ServerInfo[sSrvozila]][cPosX] = X;
CarInfo[ServerInfo[sSrvozila]][cPosY] = Y;
CarInfo[ServerInfo[sSrvozila]][cPosZ] = Z;
CarInfo[ServerInfo[sSrvozila]][cPosA] = A;
CarInfo[ServerInfo[sSrvozila]][cModel] = model;
CarInfo[ServerInfo[sSrvozila]][cCena] = cena;
CarInfo[ServerInfo[sSrvozila]][cImaVlasnika] = -1;
CarInfo[ServerInfo[sSrvozila]][cProdaja] = 1;
strmid(CarInfo[ServerInfo[sSrvozila]][cIme], veh, 0, strlen(veh), 255);
strmid(CarInfo[ServerInfo[sSrvozila]][cVlasnik], "Niko", 0, strlen("Niko"), 255);
strmid(CarInfo[ServerInfo[sSrvozila]][cTablice], "None", 0, strlen("None"), 255);
CarInfo[ServerInfo[sSrvozila]][cCol1] = col1;
CarInfo[ServerInfo[sSrvozila]][cCol2] = col2;
CarInfo[ServerInfo[sSrvozila]][cCom1] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom2] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom3] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom4] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom5] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom6] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom7] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom8] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom9] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom10] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom11] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom12] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom13] = 0;
CarInfo[ServerInfo[sSrvozila]][cCom14] = 0;
CarInfo[ServerInfo[sSrvozila]][cLock] = 0;
CarInfo[ServerInfo[sSrvozila]][cID] = sSrvozila;
CarInfo[ServerInfo[sSrvozila]][cNeaktivnost] = 1;
CarInfo[ServerInfo[sSrvozila]][cZaplenjen] = 0;
CarInfo[ServerInfo[sSrvozila]][cRegSati] = 0;
CarInfo[ServerInfo[sSrvozila]][cReg] = 0;
CarInfo[ServerInfo[sSrvozila]][cFuel] = 100;
SetVehicleNumberPlate(ServerInfo[sSrvozila],CarInfo[sSrvozila][cTablice]);

GetVehicleParamsEx(ServerInfo[sSrvozila], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(ServerInfo[sSrvozila], 0, 0, alarm, doors, bonnet, boot, objective); // sada ovim postizemo da se motor ugasi tj da ne ide dim iz auspuha
vehEngine[ServerInfo[sSrvozila]] = 0; // motor ugasen
Fuel[ServerInfo[sSrvozila]] = 100;
SacuvajVozilo(ServerInfo[sSrvozila]);
new msg[150];
new model2[24];
GetVehicleName(ServerInfo[sSrvozila],model2,sizeof(model2));
format(msg,sizeof(msg),""LYELLOW"Dodali ste auto ID:%d na pijacu (Model: %s , Cena: %d, Boja 1: %d, Boja 2: %d)",ServerInfo[sSrvozila],model2,cena,col1,col2);
SCM(playerid,-1,msg);

}
}
}
}

return 1;
}


forward IsPlayerInHeli(playerid);
public IsPlayerInHeli(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 417 || m == 425 || m == 447 || m == 469 || m == 487 || m == 488 || m == 497 || m == 548 || m == 563) { return 1; }
return 0; }

//------------------------------------------------------------------------------
forward IsPlayerInBoat(playerid);
public IsPlayerInBoat(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 430 || m == 446 || m == 452 || m == 453 || m == 454 || m == 472 || m == 473 || m == 484 || m == 493 || m == 539 || m == 595) { return 1; }
return 0; }
//================================================== ============================
forward IsPlayerInTruck(playerid);
public IsPlayerInTruck(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 448 || m == 461 || m == 443 || m == 514 || m == 515) { return 1; }
return 0; }
//------------------------------------------------------------------------------
forward IsPlayerInBike(playerid);
public IsPlayerInBike(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 448 || m == 461 || m == 462 || m == 463 || m == 468 || m == 471 || m == 521 || m == 522 || m == 523 || m == 581 || m == 586) { return 1; }
return 0; }

//------------------------------------------------------------------------------
forward IsPlayerInPlane(playerid);
public IsPlayerInPlane(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 460 || m == 476 || m == 511 || m == 512 || m == 513 || m == 519 || m == 520 || m == 553 || m == 577 || m == 592 || m == 593) { return 1; }
return 0; }

//------------------------------------------------------------------------------
forward IsPlayerInCopCar(playerid);
public IsPlayerInCopCar(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 427 || m == 490 || m == 497 || m == 523 || m == 528 || m == 596 || m == 597 || m == 598 || m == 599 || m == 601) { return 1; }
return 0; }

//------------------------------------------------------------------------------
forward IsPlayerInSWATCar(playerid);
public IsPlayerInSWATCar(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 507 || m == 528 || m == 601 || m == 487 || m == 528 || m == 596 || m == 597 || m == 598 || m == 599 || m == 601) { return 1; }
return 0; }
//================================================== ================================================== =========================
forward IsPlayerInHospitalCar(playerid);
public IsPlayerInHospitalCar(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 416 || m == 563) { return 1; }
return 0; }
//================================================== ================================================== ==================================
forward IsPlayerInNewsCar(playerid);
public IsPlayerInNewsCar(playerid) {
new m = GetVehicleModel(GetPlayerVehicleID(playerid));
if(m == 582 || m==488) { return 1; }
return 0; }
//================================================== ================================================== ============

Viewing all articles
Browse latest Browse all 595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>