Little Help
#4

pawn Код:
CMD:veh(playerid, params[]) {
new
    iVehicle,
    iColors[2];
    if(sscanf(params, "iii", iVehicle, iColors[0], iColors[1])) {
        SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /veh [model ID] [color 1] [color 2]");
    }
    else if(!(400 <= iVehicle <= 611)) {
        SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid model specified (model IDs start at 400, and end at 611).");
    }
    else if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255)) {
        SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid colour specified (IDs start at 0, and end at 255).");
    }
        new
            Float: fVehPos[4];
        GetPlayerPos(playerid, fVehPos[0], fVehPos[1], fVehPos[2]);
        GetPlayerFacingAngle(playerid, fVehPos[3]);
        CreateVehicle(iVehicle, fVehPos[0], fVehPos[1], fVehPos[2], fVehPos[3], iColors[0], iColors[1], -1);
        return SendClientMessageEx(playerid, COLOR_GREY, "Vehicle spawned!");
    }
}
In which player types in /veh [carid] [color1] [color2]
Then it spawns the vehicle.
Reply


Messages In This Thread
Little Help - by Avi57 - 22.07.2012, 06:51
Re: Little Help - by MoNeY_Co0oLzZz - 22.07.2012, 06:56
Re: Little Help - by Cjgogo - 22.07.2012, 06:57
Re: Little Help - by maramizo - 22.07.2012, 06:57
Re: Little Help - by Avi57 - 22.07.2012, 06:58
Re: Little Help - by Avi57 - 22.07.2012, 07:03
Re: Little Help - by MoNeY_Co0oLzZz - 22.07.2012, 07:12
Re: Little Help - by MoNeY_Co0oLzZz - 22.07.2012, 07:14

Forum Jump:


Users browsing this thread: 1 Guest(s)