01.09.2017, 03:58
Код:
CMD:scolor(playerid, params[]) { new color; new color2; new tmp1[64]; new tmp8[64]; new playername[64]; new string[100]; new slot = dini_Int(AddDirFile(dir_carfiles, tmp1), "Slot"); if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER) { if(sscanf(params,"ii",color,color2)) return SendClientMessage(playerid, -1, "Usage: /scolor [color1] [color2]"); ChangeVehicleColor(PlayerInfos[playerid][Car][slot], dini_Int(AddDirFile(dir_carfiles, tmp1), "Color"), color,color2); ChangeVehicleColor(GetPlayerVehicleID(playerid), color,color2); format(string, sizeof(string), "You have successfully changed your car color with %d and %d color ids",color,color2); SendClientMessage(playerid,COLOR_WHITE, string); } else return SendClientMessage(playerid,-1,"ERROR: You must be in a vehicle."); return 1; }