[pomoc] /destorycar

Započeo | MARKO |, Februar 01, 2011, 21:00:45 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

napravio sam cmd /createcars. i tom komandom stvorim vozila na odredjenom mjestu recimo 10 njih. i sad ak mi netko moze malo objasnit kako bi mogao napraviti cmd /destroycars pomocu koje cu unistiti tih 10 vozila. samo njih. hvala

Code kako izgleda cmd /createcars:

if(strcmp(cmd, "/createcars", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] < 2)
{
    SendClientMessage(playerid, COLOR_GRAD1, "   Niste autorizovani da bi ste koristili ovu komandu!");
    return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /createcars [ID vozila]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "   ID vozila ne moze biti ispod  400 ili iznad 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
CreateVehicle(car, 1708.2125,1286.8044,10.5514,359.5661, -1, -1, 0);
CreateVehicle(car, 1704.9304,1286.7896,10.5326,1.4836, -1, -1, 0);
CreateVehicle(car, 1701.6855,1286.8140,10.5321,1.5334, -1, -1, 0);
CreateVehicle(car, 1698.5854,1286.8046,10.5427,360.0000, -1, -1, 0);
CreateVehicle(car, 1695.4724,1286.8046,10.5425,0.0014, -1, -1, 0);
CreateVehicle(car, 1692.1180,1286.7992,10.5422,359.7009, -1, -1, 0);
CreateVehicle(car, 1688.9827,1286.8046,10.5437,360.0000, -1, -1, 0);
CreateVehicle(car, 1685.7667,1286.7955,10.5414,359.4926, -1, -1, 0);
CreateVehicle(car, 1682.5884,1286.8046,10.5424,360.0000, -1, -1, 0);
CreateVehicle(car, 1679.4105,1286.8046,10.5419,360.0000, -1, -1, 0);
CreateVehicle(car, 1676.1251,1286.7981,10.5421,359.6032, -1, -1, 0);
CreateVehicle(car, 1672.9993,1286.8047,10.5427,360.0000, -1, -1, 0);
CreateVehicle(car, 1669.8829,1286.8005,10.5415,359.9024, -1, -1, 0);
CreateVehicle(car, 1666.6318,1286.8047,10.5367,360.0000, -1, -1, 0);
CreateVehicle(car, 1663.3723,1286.8046,10.5427,360.0000, -1, -1, 0);
CreateVehicle(car,1660.2163,1286.8047,10.5367,360.0000, -1, -1, 0);
CreateVehicle(car, 1657.1014,1286.8043,10.5466,360.0000, -1, -1, 0);
CreateVehicle(car, 1653.7217,1286.7968,10.5486,359.7635, -1, -1, 0);
CreateVehicle(car, 1650.6450,1286.8037,10.5435,1.5700, -1, -1, 0);
CreateVehicle(car, 1647.4456,1286.8029,10.5498,359.7958, -1, -1, 0);
SendClientMessage(playerid, COLOR_RED, "Vozila stvorena!");
}
return 1;
}

Hvala

Napisi gore na vrhu skripte:


new MojAuti[OVDJE UPISI BROJ AUTA KOLIKO IH STVORIS];


u komandi ispred auta dodaj MojAuti[0], pa MojAuti[1], ... i tako dalje, znaci pocnes od 0


MojAuti[0] = CreateVehicle(...);
MojAuti[1] = CreateVehicle(...);
MojAuti[2] = CreateVehicle(...);
MojAuti[3] = CreateVehicle(...);
MojAuti[4] = CreateVehicle(...);
//i tako dalje koliko auta imas


onda ti ide komanda:


if(strcmp(cmdtext,"/destroycars",true)==0) {
for(new i=0;i<sizeof(MojAuti);i++) { DestroyVehicle(MojAuti[i]); }
return 1; }


:)
Kr0s3
is back...

[FilterScript] BizzSystem
[FilterScript] Dinamicno Rotiranje Objekata

[MAP] BalkanNation: BalkanTV

[Tutorial] VrsteVozila
[Tutorial] Razne boje sa starim bojama
[Tutorial] Radenje RPG moda "od 0"

Ukoliko trebate pomoc u skriptanju, neznate nesto napraviti ili neznate popraviti neki bug slobodno me PM...
Voljan sam pomoci svakome, jer kada sam ja ucio meni nitko nije...


Ukoliko nas podupires stavi na svoj profil,
skripta online uskoro



www.balkan-nation.com

Citat: BalcanNation poslato Februar 01, 2011, 21:10:20 POSLE PODNE
Napisi gore na vrhu skripte:


new MojAuti[OVDJE UPISI BROJ AUTA KOLIKO IH STVORIS];


u komandi ispred auta dodaj MojAuti[0], pa MojAuti[1], ... i tako dalje, znaci pocnes od 0


MojAuti[0] = CreateVehicle(...);
MojAuti[1] = CreateVehicle(...);
MojAuti[2] = CreateVehicle(...);
MojAuti[3] = CreateVehicle(...);
MojAuti[4] = CreateVehicle(...);
//i tako dalje koliko auta imas


onda ti ide komanda:


if(strcmp(cmdtext,"/destroycars",true)==0) {
for(new i=0;i<sizeof(MojAuti);i++) { DestroyVehicle(MojAuti[i]); }
return 1; }


:)

to bas tako i ne radi. xD.