Jump to content
  • 0

sistem masini problema


gabyskm96

Question

5 answers to this question

Recommended Posts

[pawn]else if(strcmp(x_nr,"sell",true) == 0)

{

if(PlayerInfo[playerid][pAcceptSellCar] == 0)

{

SendClientMessage(playerid, COLOR_WHITE, "Must be a admin of face when you sell car");

return 1;

}

GetPlayerName(playerid, sendername, sizeof(sendername));

if(!IsPlayerInAnyVehicle(playerid)){return 1;}

if(GetCreatorID(vehicleid)!=0)

{

new keycar = (dini_Int(PFile(playerid),"HaveCar"));

  if(keycar == 0) { GameTextForPlayer(playerid, "~w~You haven's got a car to sell !", 2500, 3); return 1; }

tmp = strtok(cmdtext,idx);

if(!strlen(tmp)){SendClientMessage(playerid,COLOR_GREY,"USAGE: /v sell [price]");return 1;}

new Float:vx,Float:vy,Float:vz,Float:va;

GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,vz);

GetVehicleZAngle(GetPlayerVehicleID(playerid),va);

VehicleSystem[GetCreatorID(vehicleid)][x]=vx;

VehicleSystem[GetCreatorID(vehicleid)][y]=vy;

VehicleSystem[GetCreatorID(vehicleid)][z]=vz;

VehicleSystem[GetCreatorID(vehicleid)][a]=va;

VehicleSystem[GetCreatorID(vehicleid)][preis]=strval(tmp);

VehicleSystem[GetCreatorID(vehicleid)][owned]=0;

VehicleSystem[GetCreatorID(vehicleid)][cLock]=1;

strmid(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealervehicle",0,128,128);

format(string,sizeof(string),"PersonalsVehicles/Users/%s.ini",sendername);

dini_Remove(string);

SendClientMessage(playerid,COLOR_WHITE,"This car is now for sale !");

SaveTool();

Delete3DTextLabel(TextUpCar[vehicleid]);

format(TextCar,sizeof(TextCar),"This car is for sale, price: %d",VehicleSystem[GetCreatorID(vehicleid)][preis]);

TextUpCar[vehicleid] = Create3DTextLabel(TextCar, 0xFFFFFFAA ,0,0,0,20.0,0);

Attach3DTextLabelToVehicle(TextUpCar[vehicleid],vehicleid,0.0,0.0,0.0);

PlayerInfo[playerid][pAcceptSellCar] = 0;

new personalcar = (dini_Int(PFile(playerid),"CarID"));

format(string, sizeof(string), "Personal Vehicle Bot: %s a vandut un Vehicul Personal cu ID-ul %d", sendername, personalcar);

ABroadCast(COLOR_YELLOW,string,1);

}

return 1;[/pawn]

Link to comment
Share on other sites

app nici comanda asta nu merge [pawn]//===============================================================================================//

//---Comanda: /createcar---//

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

if (strcmp(cmd, "/createcar", true) ==0 )

{

if(!IsPlayerAdmin(playerid)){return 1;}

tmp = strtok(cmdtext,idx);

if(!strlen(tmp)){return 1;}

new vehiclemodel = strval(tmp);

tmp = strtok(cmdtext,idx);

if(!strlen(tmp)){return 1;}

new color1 = strval(tmp);

tmp = strtok(cmdtext,idx);

if(!strlen(tmp)){return 1;}

new color2 = strval(tmp);

tmp = strtok(cmdtext,idx);

if(!strlen(tmp)){return 1;}

new price = strval(tmp);

new Float:px,Float:py,Float:pz,Float:pa;

GetPlayerPos(playerid,px,py,pz);

GetPlayerFacingAngle(playerid,pa);

Created++;

VehicleSystem[Created][model]=vehiclemodel;

VehicleSystem[Created][x]=px;

VehicleSystem[Created][y]=py;

VehicleSystem[Created][z]=pz;

VehicleSystem[Created][a]=pa;

VehicleSystem[Created][Farbe1]=color1;

VehicleSystem[Created][Farbe2]=color2;

VehicleSystem[Created][preis]=price;

VehicleSystem[Created][owned]=0;

VehicleSystem[Created][cLock]=1;

strmid(VehicleSystem[Created][owner],"dealervehicle",0,128,128);

new ccar = CreateVehicle(VehicleSystem[Created][model],VehicleSystem[Created][x],VehicleSystem[Created][y],VehicleSystem[Created][z],VehicleSystem[Created][a],VehicleSystem[Created][Farbe1],VehicleSystem[Created][Farbe2],600000);

IDIS[ccar]=Created;

SaveTool();

return 1;

}[/pawn]

Link to comment
Share on other sites

Exista butonul edit.

La comanda /v sell sterge if(PlayerInfo[playerid][pAcceptSellCar] == 0)

{

SendClientMessage(playerid, COLOR_WHITE, "Must be a admin of face when you sell car");

return 1;

}

Iar la cea cu /createcar schimbo,

Ai warn

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.