~Евгений~pwn
Умник
Здраствуйте,у меня такая проблема не работает кмд /addveh,тобишь после рестарта ''Транспорт'' не появляется на продаже.Вот команда,может кто-то где-то,заметит ошибку? Хотя компилятор,даёт добро..может кто сталкивался с такой проблемой? Не проходите мимо,а просто дайте ответ xD.Естественно с меня Спасибка*
PHP:
if(strcmp(cmd, "/addveh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1339)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,COLOR_WHITE,"Тебе нужно быть в машине");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "FAQ: /addveh [carid] [color1] [color2] [Цена]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, "от 400 до 611!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "FAQ: /addveh [carid] [color1] [color2] [Цена]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 300) { SendClientMessage(playerid, COLOR_WHITE, "от 0 до 300!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "FAQ: /addveh [carid] [color1] [color2] [Цена]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 300) { SendClientMessage(playerid, COLOR_WHITE, "от îò 0 до 300!"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "FAQ: /addveh [carid] [color1] [color2] [Цена]");
return 1;
}
new price;
price = strval(tmp);
if(price < 1 ) { SendClientMessage(playerid, COLOR_WHITE, "не ниже $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], "MyMode", 0, 9, 999);
SaveStuff();
SaveAuto();
format(string, sizeof(string), "Машина номер %d создана", CAR_PROD);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
return 1;
}
