21.08.2013, 23:26
(
Последний раз редактировалось RedJohn; 24.08.2013 в 00:34.
)
I need script to to remove all unoccupied cars spawned with /v command.
Already checked this thread and it's not helpful.
Already checked this thread and it's not helpful.
pawn Код:
COMMAND:v(playerid, params[])
{
if(pInfo[playerid][AdminLevel] < 4) return SendClientMessage(playerid, ERROR, ERROR_LEVEL);
new Vehicle[32], VehicleID, Float:pPosition[4], Message[50];
if(sscanf(params, "s[32]", Vehicle)) return SendClientMessage(playerid, ERROR, USAGE_V);
VehicleID = GetVehicleModelIDFromName(Vehicle);
if(VehicleID != 425 && VehicleID != 432 && VehicleID != 447 &&
VehicleID != 430 && VehicleID != 417 && VehicleID != 435 &&
VehicleID != 446 && VehicleID != 449 && VehicleID != 450 &&
VehicleID != 452 && VehicleID != 453 && VehicleID != 454 &&
VehicleID != 460 && VehicleID != 464 && VehicleID != 465 &&
VehicleID != 469 && VehicleID != 472 && VehicleID != 473 &&
VehicleID != 476 && VehicleID != 484 && VehicleID != 487 &&
VehicleID != 488 && VehicleID != 493 && VehicleID != 497 &&
VehicleID != 501 && VehicleID != 511 && VehicleID != 512 &&
VehicleID != 513 && VehicleID != 519 && VehicleID != 520 &&
VehicleID != 537 && VehicleID != 538 && VehicleID != 548 &&
VehicleID != 553 && VehicleID != 563 && VehicleID != 564 &&
VehicleID != 569 && VehicleID != 570 && VehicleID != 577 &&
VehicleID != 584 && VehicleID != 590 && VehicleID != 591 &&
VehicleID != 592 && VehicleID != 593 && VehicleID != 594 &&
VehicleID != 595 && VehicleID != 606 && VehicleID != 607 &&
VehicleID != 608 && VehicleID != 610 && VehicleID != 611)
{
if(VehicleID == -1 )
{
VehicleID = strval(Vehicle);
if(VehicleID < 400 || VehicleID > 611 ) return SendClientMessage(playerid, ERROR, ERROR_INVALID_CAR);
}
}
GetPlayerPos(playerid, pPosition[0], pPosition[1], pPosition[2]);
GetPlayerFacingAngle(playerid, pPosition[3]);
CreateVehicle(VehicleID, pPosition[0]+15.0, pPosition[1]+15.0, pPosition[2]+2.0, pPosition[3]+90, -1, -1, 5000);
Vehicle[0] = toupper(Vehicle[0]);
format(Message, sizeof(Message), "'%s' spawned.", Vehicle[0]);
SendClientMessage(playerid, ABLUE, Message);
return 1;
}