Jump to content
  • 0

Question

Posted

Vreau si eu comanda /destroycar doar pentru o singura masina personala sa intru in ea si sa o sterg eu am comanda asta :

[pawn] if(strcmp(cmd, "/destroycars", true) == 0)

{

if(IsPlayerConnected(playerid))

{

if(PlayerInfo[playerid][pAdmin] >= 1338)

{

for(new h = 732; h < sizeof(CarInfo); h++)

{

new car = h;

format(string, 128, "cars/%d.ini", car);

dini_Create(string);

CarInfo[car][cID] = car;

new text[20];

CarInfo[car][cOwned] = 0;

text = "No-One";

strmid(CarInfo[car][cOwner], text, 0, strlen(text), 999);

CarInfo[car][cLocationx] = 0;

CarInfo[car][cLocationy] = 0;

CarInfo[car][cLocationz] = 0;

CarInfo[car][cAngle] = 0;

CarInfo[car][cModel] = 0;

CarInfo[car][cColorOne] = 0;

CarInfo[car][cColorTwo] = 0;

format(string, sizeof(string), "Destroyed Car ID: %d", car);

SendClientMessage(playerid, COLOR_WHITE, string);

DestroyVehicle(car);

SaveCar(car);

}

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

{

PlayerInfo[pCar] = 9999;

SendClientMessage(i, COLOR_WHITE, "Masina ta personala a fost stearsa, o poti crea acum din nou!");

}

}

}

return 1;

}[/pawn]

Dar aceasta comanda sterge toate masinile

2 answers to this question

Recommended Posts

Posted

Iarasi mura in gura xD.

Da greu e sa iti dai seama dupa nume ca va distruge toate masinile personale nu doar 1 xD.

	if(strcmp(cmd, "/destroycar", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] >= 1338)
			{
				for(new h = 732; h < sizeof(CarInfo); h++)
				{
					new car = GetPlayerVehicleID( playerid );
					format(string, 128, "cars/%d.ini", car);
					dini_Create(string);
					CarInfo[h][cID] = car;
					new text[20];
					CarInfo[h][cOwned] = 0;
					text = "No-One";
					strmid(CarInfo[h][cOwner], text, 0, strlen(text), 999);
					CarInfo[h][cLocationx] = 0;
					CarInfo[h][cLocationy] = 0;
					CarInfo[h][cLocationz] = 0;
					CarInfo[h][cAngle] = 0;
					CarInfo[h][cModel] = 0;
					CarInfo[h][cColorOne] = 0;
					CarInfo[h][cColorTwo] = 0;
					format(string, sizeof(string), "Destroyed Car ID: %d", car);
					SendClientMessage(playerid, COLOR_WHITE, string);
					DestroyVehicle(car);
					SaveCar(h);
				}
				for(new i = 0; i <= MAX_PLAYERS; i++)
				{
					PlayerInfo[i][pCar] = 9999;
					SendClientMessage(i, COLOR_WHITE, "Masina ta personala a fost stearsa, o poti crea acum din nou!");
				}
			}
		}
		return 1;
	}

I'm back bitches.

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.