09.05.2014, 08:30
pawn Код:
CMD:vcolor(playerid, vehicleid, params[])
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a vehicle!");
new c1, c2;
if(sscanf(params,"dd",c1,c2)) return SendClientMessage(playerid, -1, "INFO: /vcolor [color1] [color2]");
if(c1<0||c1>127) return SendClientMessage( playerid, -1, "Invalid id color one.") ;
if(c2<0||c2>127) return SendClientMessage( playerid, -1, "invalid id color two.") ;
new veh_ID = GetPlayerVehicleID(playerid);
//new query[60];
//format(query,sizeof(query),"UPDATE cars SET color1=%i,color2=%i WHERE id=%i",cInfo[veh_ID][c_c1],cInfo[veh_ID][c_c2],cInfo[veh_ID][db_id]);
//mysql_function_query(dbhandle,query,false,"","");
SendClientMessage(playerid, -1, "Ti-ai setat culorile dorite !!");
ChangeVehicleColor(veh_ID, c1, c2);
SaveVehicle(veh_ID);
return 1;
}