17.08.2012, 16:36
I have no idea if this will work as I don't have SA-MP installed. Give it a go and we'll talk later.
pawn Код:
CMD:cc(playerid, params[])
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
return SendClientMessage(playerid, COLOR_CHARTREUSE, "(SERVER) {FF0000}ERROR: {FFFFFF}You must be the driver of the vehicle in order to use this command.");
new
colour1,
colour2
;
if(sscanf(params, "iI", colour1, colour2))
return SendClientMessage(playerid, COLOR_CHARTREUSE, "(SERVER) {33CCFF}USAGE: {FFFFFF}/cc [0-255] [0-255]");
if(isnull(params[1]))
ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour1);
else
ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
return 1;
}