07.07.2012, 17:21
hey, I was wondering, how to make a /aveh command? like admin vehicle.
This is what I did:
The problem here is that I can't spawn a vehicle. Everytime I do it shows "Vehicle ID's: 400-611"
This is what I did:
pawn Код:
// ADMIN COMMNAD: aveh //
COMMAND:aveh(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFF, "{FFFFFF}SERVER: Unkown command.");
new vehicle, color;
if(sscanf(params, "uiii", vehicle, color)) return SendClientMessage(playerid, 0xFFFFFF, "{FFFFFF}Correct usage: /aveh [vehicle ID] [color1] [color2]");
if(vehicle > 611 || vehicle < 400) return SendClientMessage(playerid, 0xFFFFFF, "Vehicle ID's: 400-611");
if(color > 255 || color < 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
GetPlayerVehicleID(vehicle, color, color);
return 1;
}