[Help]ZCMD Q!

Započeo SlicK, Decembar 07, 2010, 19:08:56 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pozdrav,pokusavao sam ali ne radi...Nikako ovu:
if(strcmp(cmd, "/veh", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFA000FF, "KOMANDA: /veh [id] [boja 1] [boja 2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, CRVENA_BOJA, "   ID vozila moze biti samo veci od 400 ili manji od 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFA000FF, "KOMANDA: /veh [id] [boja 1] [boja 2]");
return 1;
}
new color1;
color1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFA000FF, "KOMANDA: /veh [id] [boja 1] [boja 2]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] == 1338 || IsPlayerAdmin(playerid))
{
new color2;
color2 = strval(tmp);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
format(string, sizeof(string), "   Vozilo %d spawnano.", carid);
SendClientMessage(playerid, 0x0000FF68, string);
}
}
return 1;
}
komandu nemogu premijestit u ZCMD,muci me ovo cmdtext i params...Pa ako bi netko bio toliko dobar da mi pomogne,hvala! :)
Mysterious roleplay

CMD:veh(playerid, params[])
{
new carid, Float: CarToX, Float: CarToY, Float: CarToZ, physical_car_id;
if(sscanf(params, "d", carid))
{
if(PlayerInfo[playerid][pAdminl] == 1338)
{
SendClientMessage(playerid, Boja,"Koristenje: /vec [IDvozila]");
}
}
else
{
if(PlayerInfo[playerid][pAdmin] == 1338)
{
if(carid < 400 || carid > 611)
{
SendClientMessage(playerid,boja,"400-611 IDevi vozila.");
return 1;
}
GetPlayerPos(playerid, CarToX, CarToY, CarToZ);
physical_car_id = CreateVehicle(carid, CarToX, CarToY+4, CarToZ, 90, -1, -1, -1);
PutPlayerInVehicle(playerid, physical_car_id, 0);
LinkVehicleToInterior(physical_car_id, GetPlayerInterior(playerid));
SetVehicleVirtualWorld(physical_car_id, GetPlayerVirtualWorld(playerid));
}
}
return true;
}



Evo probaj ovo za spawnanje vozila i ti dodaj u ovo samo boje,to bi trebao znati...

Bez brige,ovo nisam samo znao "sscanf(params, "d", carid)",prvi puta se sluzim ovime...Hvala ti!  ;)
Mysterious roleplay