24.12.2018, 06:34
Код:
CMD:veh(playerid, params[]) { new vehid; if (sscanf(params, "i", vehid)) { SendClientMessage(playerid, -1, "[USAGE]: /veh [vehid 400 - 611]"); return 1; } if (vehid < 400 || vehid > 611) { SendClientMessage(playerid, -1, "[USAGE]: /veh [vehid 400 - 611]"); return 1; } new Float:x, Float:y, Float:z, Float:a, Float:tA; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); tA = a < 270.0 ? a + 90.0 : a - 270.0; CreateVehicle(vehid, x + (floatsin(-a, degrees) * 5.0), y + (floatcos(-a, degrees) * 5.0), z, tA, 0, 0, 0); return 1; }