20.01.2012, 19:44
PHP код:
COMMAND:cc(playerid, params[])
{
new color1,color2,vid = GetPlayerVehicleID(playerid),pstate = GetPlayerState(playerid);
if(sscanf(params, "ii", color1)) return SendClientMessage(playerid,COLOR_LIGHTBLUE, "USAGE: {FFFFFF}/cc [color 1] [color 2]"); //You don't need to add the second color if you don't want
if(pstate != PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_RED,"ERROR: {FFFFFF}You must be the driver of a vehicle to change your car colour.");
ChangeVehicleColor(vid,color1,color2);
SendClientMessage(playerid,COLOR_RED,"SYSTEM: {FFFFFF}You have successfully changed the colour of your vehicle.");
return 1;
}