pawn Код:
else if(strcmp(x_nr,"model",true) == 0)
{
new Float:x,Float:y,Float:z;
new carid;
new getcarid;
new Float:a;
getcarid = GetPlayerVehicleID(playerid);
GetVehiclePos(carid, x, y, z);
GetVehicleZAngle(carid, a);
if(IsPlayerInVehicle(playerid,carid))
{
if(PlayerInfo[playerid][pAdmin] <= 1338)
{
SendClientMessage(playerid, COLOR_GREY, "You are not admin.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: /v model [model]");
return 1;
}
new model;
model = strval(tmp);
if(model < 400 || model > 600)
else
{
CarInfo[carid][cModel] = model;
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "~n~ You Changed Model Car. ~n~");
OnPlayerUpdate(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}