// 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;
}
if(sscanf(params, "uiii", vehicle, color))
CMD:aveh(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0; //same as that client message you made
if(isnull(params)) return Usage(playerid, "/car [model]");
new veh, col[2];
new tmp[32],string[148];
if(sscanf(params, "s[32]I(-1)I(-1)", tmp, col[0], col[1])) return SendClientMessage(playerid, COLOR_RED, "/aveh [model] [color] [color]");
if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid,COLOR_RED, "vehcile IDs between 400 - 611!");
if(col[0] || col[1] > 255 || col[0] || col[1]< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
new Float:cPos[4];
GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
GetPlayerFacingAngle(playerid, cPos[3]);
CreateVehicle(vehicle, cPos[0], cPos[1]-3, cPos[2], cPos[3], col[0], col[1], -1);
return 1;
}
CMD:aveh(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new type,color,color2,Float:cPos[4];
if(sscanf(params, "iii", type,color,color2) return SendClientMessage(playerid, COLOR_RED, "/aveh [model] [color] [color]");
if(type < 400 || type > 611) return SendClientMessage(playerid,COLOR_RED, "vehicle IDs between 400 - 611!");
if(color> 255 || color< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
if(color2> 255 || color2< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
GetPlayerFacingAngle(playerid, cPos[3]);
CreateVehicle(vehicle, cPos[0], cPos[1]-3, cPos[2], cPos[3], color, color2, -1);
return 1;
}
pawn Код:
|