07.04.2013, 18:13
(
Последний раз редактировалось [..MonTaNa..]; 30.04.2013 в 04:57.
)
.....
CMD:veh(playerid, params[])
{
if(!IsCnRAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Must Be An Admin To Spawn This Vehicle.");
if(isDead[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command In An Interior.");
new carName[32];
if(sscanf(params, "s[32]", carName)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /veh (Vehicle Name)");
if(BlockVeh == 1) return SendClientMessage(playerid, COLOR_RED, "This Command Is DISABLED.");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Are Already In A Vehicle.");
if(ReturnVehicleID(carName) == INVALID_VEHICLE_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid Vehicle Model.");
if(IsVehicleForbidden(ReturnVehicleID(carName))) return SendClientMessage(playerid, COLOR_RED, "You Must Be An Admin To Spawn This Vehicle.");
new Float:pPos[4], vid;
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
GetPlayerFacingAngle(playerid, pPos[3]);
vid = CreateVehicle(ReturnVehicleID(carName), pPos[0], pPos[1], pPos[2] + 1.00, pPos[3], 0, 0, 60);
PutPlayerInVehicle(playerid, vid, 0);
return 1;
}
CMD:veh(playerid, params[])
{
if(!IsCnRAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Must Be An Admin To Spawn This Vehicle.");
if(isDead[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command When Dead.");
if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command In An Interior.");
new carName[32];
if(sscanf(params, "s[32]", carName)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /veh (Vehicle Name)");
if(BlockVeh == 1) return SendClientMessage(playerid, COLOR_RED, "This Command Is DISABLED.");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You Are Already In A Vehicle.");
if(ReturnVehicleID(carName) == INVALID_VEHICLE_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid Vehicle Model.");
if(IsVehicleForbidden(ReturnVehicleID(carName))) return SendClientMessage(playerid, COLOR_RED, "You Must Be An Admin To Spawn This Vehicle.");
new Float:pPos[4], vid;
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
GetPlayerFacingAngle(playerid, pPos[3]);
vid = CreateVehicle(ReturnVehicleID(carName), pPos[0], pPos[1], pPos[2] + 1.00, pPos[3], 0, 0, 60);
PutPlayerInVehicle(playerid, vid, 0);
return 1;
}