Flocker
Нуль
- Регистрация
- 4 Мар 2012
- Сообщения
- 5
- Лучшие ответы
- 0
- Репутация
- 0
Вобщем при написание команды ничего не создает после рестарта тоже помогите !
HTML:
}
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], "The State", 0, 9, 999);
SaveStuff();
SaveAuto();
format(string, sizeof(string), "* Машина на продажу номер %d создана.", CAR_PROD);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}
return 1;
}