24.11.2013, 07:07
Well, I'm not really so good at CreateVehicle stuff, but i tried creating a simple command, that would allow admins to spawn their own vehicle, but sadly the vehicle doesn't appear..
pawn Код:
CMD:v(playerid, params[]) {
new vehicleid;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[ADMIN] - Only admins can use command!");
if(sscanf(params, "u", vehicleid)) SendClientMessage(playerid, COLOR_ORANGE, "[USAGE] - /v [ID]");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "[NOTE] - You can't be in a vehicle if you want to use this command.");
else
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
vehicleid = CreateVehicle(vehicleid,X,Y,Z,0,1, 1, 60);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
return 1;
}