Donmx
Умник
Вот скрипт, всё пишет Авто ID номер добавлена а делаеш тп к этому авто просто летиш ниже земли, но авто нету в чем проблема? вот комманда:
PHP:
if(strcmp(cmd, "/addveh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,COLOR_GREY,"Òåáå íóæíî áûòü â òðàíñïîðòå");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "ÈÍÔÎ: /addveh [carid] [color1] [color2] [öåíà]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "Îò 400 äî 611!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "ÈÍÔÎ: /addveh [carid] [color1] [color2] [öåíà]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 300) { SendClientMessage(playerid, COLOR_GREY, "Öâåò ëèøü îò 0 äî 300!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "ÈÍÔÎ: /addveh [carid] [color1] [color2] [öåíà]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 300) { SendClientMessage(playerid, COLOR_GREY, "Öâåò îò 0 äî 300!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "ÈÍÔÎ: /addveh [carid] [color1] [color2] [öåíà]");
return 1;
}
new price;
price = strval(tmp);
if(price < 1 ) { SendClientMessage(playerid, COLOR_GREY, "Öåíà íå ìåíüøå $1"); return 1; }
new Float:X,Float:Y,Float:Z,Float:Q;
GetVehiclePos(GetPlayerVehicleID(playerid), X,Y,Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid),Q);
CAR_PROD ++;
AutoInfo[CAR_PROD][aStats]=0;
AutoInfo[CAR_PROD][aModel]=car;
AutoInfo[CAR_PROD][aAutoX]=X;
AutoInfo[CAR_PROD][aAutoY]=Y;
AutoInfo[CAR_PROD][aAutoZ]=Z;
AutoInfo[CAR_PROD][aAutoAngle]=Q;
AutoInfo[CAR_PROD][aColor1]=color1;
AutoInfo[CAR_PROD][aColor2]=color2;
AutoInfo[CAR_PROD][aPrice]=price;
AutoInfo[CAR_PROD][aKey]=2;
AutoInfo[CAR_PROD][a0]=0;
AutoInfo[CAR_PROD][a1]=0;
AutoInfo[CAR_PROD][a2]=0;
AutoInfo[CAR_PROD][a3]=0;
AutoInfo[CAR_PROD][a4]=0;
AutoInfo[CAR_PROD][a5]=0;
AutoInfo[CAR_PROD][a6]=0;
AutoInfo[CAR_PROD][a7]=0;
AutoInfo[CAR_PROD][a8]=0;
AutoInfo[CAR_PROD][a9]=0;
AutoInfo[CAR_PROD][a10]=0;
AutoInfo[CAR_PROD][a11]=0;
AutoInfo[CAR_PROD][a12]=0;
AutoInfo[CAR_PROD][a13]=0;
AutoInfo[CAR_PROD][aPaintJob]=0;
strmid(AutoInfo[CAR_PROD][aOwner], "DanGerGame", 0, 9, 999);
SaveStuff();
SaveAuto();
format(string, sizeof(string), "* Ìàøèíà íà ïðîäàæó íîìåð %d ñîçäàíà.", CAR_PROD);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}
return 1;
}
